- 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) convertEpochMsToVideoTimeSeconds(epochTime)
Name | Type | Description |
---|---|---|
epochTime | Number | Unix Epoch based time in milliseconds. |
- Source
the time in seconds within the current sliding window.
(static) convertVideoTimeSecondsToEpochMs(time)
Name | Type | Description |
---|---|---|
time | Number | Seconds |
- Source
the time in milliseconds within the current sliding window.
(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) getLiveWindowData() → {Object}
- Source
An object of the shape {windowStartTime: Number, windowEndTime: Number, initialPlaybackTime: Number, serverDate: Date}
- Type:
- Object
(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) 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}
Returns an object including the current start and end times.
- Source
{start: Number, end: Number}
- Type:
- Object
(static) getWindowType()
Returns the current window type.
- Source
- See
module:bigscreenplayer/models/windowtypes
(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) 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) setCurrentTime(time)
Sets the current time of the media asset.
Name | Type | Description |
---|---|---|
time | Number | In seconds |
- 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) 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) getLiveSupport(device)
Name | Type | Description |
---|---|---|
device | TALDevice |
- Source
the live support of the device.
(inner) init(playbackElement, bigscreenPlayerData, newWindowType, enableSubtitles, 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 | |
newWindowType | WindowTypes | |
enableSubtitles | boolean | Enable subtitles on initialisation |
callbacks | InitCallbacks |
- Source
(inner) tearDown()
Should be called at the end of all playback sessions. Resets state and clears any UI.
- Source