Methods

(static) areSubtitlesCustomisable()

Returns if a device supports the customisation of subtitles

Returns:

boolean

(static) canPause()

Returns:

Returns whether the current media asset is pausable.

(static) canSeek()

Returns:

Returns whether the current media asset is seekable.

(static) clearResize()

Clear any resize properties added with resize

(static) clearSubtitleExample()

Clear the example subtitle string

(static) convertEpochMsToVideoTimeSeconds(epochTime)

Parameters:
NameTypeDescription
epochTimeNumber

Unix Epoch based time in milliseconds.

Returns:

the time in seconds within the current sliding window.

(static) convertVideoTimeSecondsToEpochMs(time)

Parameters:
NameTypeDescription
timeNumber

Seconds

Returns:

the time in milliseconds within the current sliding window.

(static) customiseSubtitles(styleOpts)

Customise the rendered subitles style

Parameters:
NameTypeDescription
styleOptsSubtitlesCustomisationOptions

(static) getCurrentTime() → {Number}

Returns the media asset's current time in seconds.

Returns:
Type: 
Number

(static) getDuration()

Returns:

the duration of the media asset.

(static) getFrameworkVersion()

Returns:

The runtime version of the library.

(static) getLiveWindowData() → {Object}

Returns:

An object of the shape {windowStartTime: Number, windowEndTime: Number, initialPlaybackTime: Number, serverDate: Date}

Type: 
Object

(static) getLogLevels() → {Object}

Returns:
  • Key value pairs of available log levels
Type: 
Object

(static) getMediaKind()

Returns the current media kind. 'audio' or 'video'

(static) getPlaybackRate() → {Number}

Get the current playback rate

Returns:

the current media playback rate

Type: 
Number

(static) getPlayerElement()

Returns:

The media element currently being used.

(static) getSeekableRange() → {Object}

Returns an object including the current start and end times.

Returns:

{start: Number, end: Number}

Type: 
Object

(static) getWindowType()

Returns the current window type.

See
  • module:bigscreenplayer/models/windowtypes

(static) isEnded()

Returns:

if the media asset has ended.

(static) isPaused()

Returns:

if the player is paused.

(static) isPlayingAtLiveEdge() → {boolean}

Returns:

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()

Returns:

Returns whether or not subtitles are currently enabled.

(static) isSubtitlesEnabled()

Returns:

if subtitles are currently enabled.

(static) mock(opts)

Return a mock for in place testing.

Parameters:
NameTypeDescription
opts*

(static) mockJasmine(opts)

Return a mock for unit tests.

Parameters:
NameTypeDescription
opts*

(static) pause(opts)

Pause the media asset.

Parameters:
NameTypeDescription
opts*
Properties
NameTypeDescription
userPauseboolean
disableAutoResumeboolean

(static) play()

Play the media assest from the current point in time.

(static) registerForStateChanges(callback)

Pass a function to call whenever the player transitions state.

Parameters:
NameTypeDescription
callbackfunction
See
  • module:models/mediastate

(static) registerForSubtitleChanges(callback)

Pass a function to be called whenever subtitles are enabled or disabled.

Parameters:
NameTypeDescription
callbackfunction

(static) registerForTimeUpdates(callback)

Pass a function to call whenever the player issues a time update.

Parameters:
NameTypeDescription
callbackfunction

(static) registerPlugin(plugin)

Register a plugin for extended events.

Parameters:
NameTypeDescription
plugin*

(static) renderSubtitleExample(xmlString, styleOpts, safePosition)

Render an example subtitles string with a given style and location

Parameters:
NameTypeDescription
xmlStringstring

EBU-TT-D compliant XML String

styleOptsSubtitlesCustomisationOptions
safePositionDOMRect

(static) resize(top, left, width, height, zIndex)

Resize the video container div in the most compatible way

Parameters:
NameTypeDescription
topNumber

px

leftNumber

px

widthNumber

px

heightNumber

px

zIndexNumber

(static) setCurrentTime(time)

Sets the current time of the media asset.

Parameters:
NameTypeDescription
timeNumber

In seconds

(static) setLogLevel(logLevel)

Parameters:
NameTypeDescription
logLevel

log level to display @see getLogLevels

(static) setPlaybackRate(rate)

Set the media element playback rate

Parameters:
NameTypeDescription
rateNumber

(static) setSubtitlesEnabled(value)

Set whether or not subtitles should be enabled.

Parameters:
NameTypeDescription
valueboolean

(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).

Parameters:
NameTypeDescription
position*

(static) toggleDebug()

Toggle the visibility of the debug tool overlay.

(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.

(static) unmock()

Unmock the player.

(static) unregisterForStateChanges(callback)

Unregisters a previously registered callback.

Parameters:
NameTypeDescription
callbackfunction

(static) unregisterForSubtitleChanges(callback)

Unregisters a previously registered callback for changes to subtitles.

Parameters:
NameTypeDescription
callbackfunction

(static) unregisterForTimeUpdates(callback)

Unregisters a previously registered callback.

Parameters:
NameTypeDescription
callbackfunction

(static) unregisterPlugin(plugin)

Unregister a previously registered plugin.

Parameters:
NameTypeDescription
plugin*

(inner) getLiveSupport(device)

Parameters:
NameTypeDescription
deviceTALDevice
Returns:

the live support of the device.

(inner) init(playbackElement, bigscreenPlayerData, newWindowType, enableSubtitles, callbacks)

Call first to initialise bigscreen player for playback.

Parameters:
NameTypeDescription
playbackElementHTMLDivElement

The Div element where content elements should be rendered

bigscreenPlayerDataInitData
newWindowTypeWindowTypes
enableSubtitlesboolean

Enable subtitles on initialisation

callbacksInitCallbacks

(inner) tearDown()

Should be called at the end of all playback sessions. Resets state and clears any UI.