- Source
Methods
(static) areSubtitlesCustomisable()
Returns if a device supports the customisation of subtitles
- Source
boolean
(static) canPause()
- Source
Returns whether the current media asset is pausable.
(static) canSeek()
- Source
Returns whether the current media asset is seekable.
(static) clearResize()
Clear any resize properties added with resize
- Source
(static) clearSubtitleExample()
Clear the example subtitle string
- Source
(static) customiseSubtitles(styleOpts)
Customise the rendered subitles style
| Name | Type | Description |
|---|---|---|
styleOpts | SubtitlesCustomisationOptions |
- Source
(static) getCurrentTime() → {Number}
Returns the media asset's current time in seconds.
- Source
- Type:
- Number
(static) getDuration()
- Source
the duration of the media asset.
(static) getFrameworkVersion()
- Source
The runtime version of the library.
(static) getLogLevels() → {Object}
- Source
- Key value pairs of available log levels
- Type:
- Object
(static) getMediaKind()
Returns the current media kind. 'audio' or 'video'
- Source
(static) getPlaybackBitrate()
Returns current playback bitrate for media kind.
- Source
(static) getPlaybackRate() → {Number}
Get the current playback rate
- Source
the current media playback rate
- Type:
- Number
(static) getPlayerElement()
- Source
The media element currently being used.
(static) getSeekableRange() → {Object|null}
Returns an object including the current start and end times.
- Source
{start: Number, end: Number}
- Type:
- Object |
null
(static) isAudioDescribedAvailable() → {boolean}
- Source
true if an Audio Described track is available
- Type:
- boolean
(static) isAudioDescribedEnabled() → {boolean}
- Source
true if the Audio Described track is currently being used
- Type:
- boolean
(static) isEnded()
- Source
if the media asset has ended.
(static) isPaused()
- Source
if the player is paused.
(static) isPlayingAtLiveEdge() → {boolean}
- Source
Returns true if media is initialised and playing a live stream within a tolerance of the end of the seekable range (10 seconds).
- Type:
- boolean
(static) isSubtitlesAvailable()
- Source
Returns whether or not subtitles are currently enabled.
(static) isSubtitlesEnabled()
- Source
if subtitles are currently enabled.
(static) mock(opts)
Return a mock for in place testing.
| Name | Type | Description |
|---|---|---|
opts | * |
- Source
(static) mockJasmine(opts)
Return a mock for unit tests.
| Name | Type | Description |
|---|---|---|
opts | * |
- Source
(static) pause(opts)
Pause the media asset.
| Name | Type | Description | ||||||
|---|---|---|---|---|---|---|---|---|
opts | * | Properties
|
- Source
(static) play()
Play the media assest from the current point in time.
- Source
(static) registerForAudioDescribedChanges(callback)
Pass a function to be called whenever Audio Described is enabled or disabled.
| Name | Type | Description |
|---|---|---|
callback | function |
- Source
(static) registerForStateChanges(callback)
Pass a function to call whenever the player transitions state.
| Name | Type | Description |
|---|---|---|
callback | function |
- Source
- See
module:models/mediastate
(static) registerForSubtitleChanges(callback)
Pass a function to be called whenever subtitles are enabled or disabled.
| Name | Type | Description |
|---|---|---|
callback | function |
- Source
(static) registerForTimeUpdates(callback)
Pass a function to call whenever the player issues a time update.
| Name | Type | Description |
|---|---|---|
callback | function |
- Source
(static) registerPlugin(plugin)
Register a plugin for extended events.
| Name | Type | Description |
|---|---|---|
plugin | * |
- Source
(static) renderSubtitleExample(xmlString, styleOpts, safePosition)
Render an example subtitles string with a given style and location
| Name | Type | Description |
|---|---|---|
xmlString | string | EBU-TT-D compliant XML String |
styleOpts | SubtitlesCustomisationOptions | |
safePosition | DOMRect |
- Source
(static) resize(top, left, width, height, zIndex)
Resize the video container div in the most compatible way
| Name | Type | Description |
|---|---|---|
top | Number | px |
left | Number | px |
width | Number | px |
height | Number | px |
zIndex | Number |
- Source
(static) setAudioDescribed() → {Promise.<void>}
- Source
- Type:
- Promise.<void>
(static) setBitrateConstraint()
Set constrained bitrate given a min/max range and mediakind.
- Source
(static) setCurrentTime(seconds, timeline)
Sets the current time of the media asset.
| Name | Type | Description |
|---|---|---|
seconds | number | |
timeline | Timeline |
- Source
(static) setLogLevel(logLevel)
| Name | Type | Description |
|---|---|---|
logLevel | log level to display @see getLogLevels |
- Source
(static) setPlaybackRate(rate)
Set the media element playback rate
| Name | Type | Description |
|---|---|---|
rate | Number |
- Source
(static) setSubtitlesEnabled(value)
Set whether or not subtitles should be enabled.
| Name | Type | Description |
|---|---|---|
value | boolean |
- Source
(static) setTransportControlsPosition(position)
An enum may be used to set the on-screen position of any transport controls (work in progress to remove this - UI concern).
| Name | Type | Description |
|---|---|---|
position | * |
- Source
(static) toggleDebug()
Toggle the visibility of the debug tool overlay.
- Source
(static) transitions()
Returns an object with a number of functions related to the ability to transition state given the current state and the playback strategy in use.
- Source
(static) unmock()
Unmock the player.
- Source
(static) unregisterForAudioDescribedChanges(callback)
Unregisters a previously registered callback for changes to Audio Described.
| Name | Type | Description |
|---|---|---|
callback | function |
- Source
(static) unregisterForStateChanges(callback)
Unregisters a previously registered callback.
| Name | Type | Description |
|---|---|---|
callback | function |
- Source
(static) unregisterForSubtitleChanges(callback)
Unregisters a previously registered callback for changes to subtitles.
| Name | Type | Description |
|---|---|---|
callback | function |
- Source
(static) unregisterForTimeUpdates(callback)
Unregisters a previously registered callback.
| Name | Type | Description |
|---|---|---|
callback | function |
- Source
(static) unregisterPlugin(plugin)
Unregister a previously registered plugin.
| Name | Type | Description |
|---|---|---|
plugin | * |
- Source
(inner) BigscreenPlayer()
- Source
(inner) init(playbackElement, bigscreenPlayerData, callbacks)
Call first to initialise bigscreen player for playback.
| Name | Type | Description |
|---|---|---|
playbackElement | HTMLDivElement | The Div element where content elements should be rendered |
bigscreenPlayerData | InitData | |
callbacks | InitCallbacks |
- Source
(inner) tearDown()
Should be called at the end of all playback sessions. Resets state and clears any UI.
- Source
Type Definitions
PlaybackTimeInit
- Object
| Name | Type | Attributes | Description |
|---|---|---|---|
seconds | number | ||
timeline | Timeline | <optional> |
- Source
