Members
LetterboxConfiguration :Object
Type:
- Object
Properties:
| Name | Type | Attributes | Default | Description | |||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
analytics |
Boolean | allows to enable or disable the SRG SSR analytics |
|||||||||||||||||||||||||||||||||||||||||||||||
chromeCastReceiver |
String |
<optional> |
1AC2931D | set a custom Chrome Cast Receiver app id |
|||||||||||||||||||||||||||||||||||||||||||||
container |
String | query selector of the HTMLElement where the player will be created |
|||||||||||||||||||||||||||||||||||||||||||||||
debug |
Boolean |
<optional> |
false | debug mode to show logs in dev console through videojs logs |
|||||||||||||||||||||||||||||||||||||||||||||
endScreenPlaylist |
Array.<Object> |
<optional> |
false | allows to provide a custom end screen playlist, must be an array with 18 items Properties
|
|||||||||||||||||||||||||||||||||||||||||||||
userReport |
Object |
<optional> |
allows to control the display of the error report button Properties
|
||||||||||||||||||||||||||||||||||||||||||||||
fillMode |
Boolean |
<optional> |
true | set the layout: (true for fill, false for fluid) |
|||||||||||||||||||||||||||||||||||||||||||||
ilHost |
String |
<optional> |
il.srgssr.ch | Integration layer server hostname to use for URN resolution |
|||||||||||||||||||||||||||||||||||||||||||||
language |
String |
<optional> |
en | set the player's default language, supported values en, fr, de, it and rm only |
|||||||||||||||||||||||||||||||||||||||||||||
nextEpisodeRecommendation |
Boolean |
<optional> |
false | allows to use the recommendation service provided by Playfff |
|||||||||||||||||||||||||||||||||||||||||||||
noUI |
Boolean |
<optional> |
false | allows to disable the player's UI |
|||||||||||||||||||||||||||||||||||||||||||||
playerFocus |
Object |
<optional> |
allows to set the focus to the player at initialization to use hotkeys. By default playerFocus is set to undefined which means the focus method will be called without preventScroll object. See focus documentation for further details. |
||||||||||||||||||||||||||||||||||||||||||||||
recommendations |
Boolean |
<optional> |
true | allows to show or hide the recommendation screen |
|||||||||||||||||||||||||||||||||||||||||||||
storageNamespace |
String |
<optional> |
srgssr/letterbox/userStorage | defines the player's localStorage namespace |
|||||||||||||||||||||||||||||||||||||||||||||
tagCommanderScriptURL |
String |
<optional> |
//colibri-js.akamaized.net/penguin/tc_SRGGD_11.js | defines the tagCommander script URL |
|||||||||||||||||||||||||||||||||||||||||||||
warningMessageTimeout |
Int |
<optional> |
6000 | sets the timeout in milliseconds after what the message will be hidden |
|||||||||||||||||||||||||||||||||||||||||||||
components |
Object | lists all component that can be shown or hidden. The value trop allow to show the component when false will hide it Properties
|
|||||||||||||||||||||||||||||||||||||||||||||||
audioTrackLanguage |
Object |
<optional> |
{default:false, storage:true} | allows to control the audio track language user experience |
|||||||||||||||||||||||||||||||||||||||||||||
autoplay |
Object |
<optional> |
{default:false, storage:true} | allows to control the autoplay user experience |
|||||||||||||||||||||||||||||||||||||||||||||
continuousPlayback |
Object |
<optional> |
{default:false, storage:true} | allows to control the continuous playback user experience |
|||||||||||||||||||||||||||||||||||||||||||||
debugMenu |
Object |
<optional> |
false | allows to display the debug option in the setting menu |
|||||||||||||||||||||||||||||||||||||||||||||
hd |
Object |
<optional> |
{default:true, storage:true} | allows to control the resource quality |
|||||||||||||||||||||||||||||||||||||||||||||
muted |
Object |
<optional> |
{default:false, storage:true} | allows to control the volume user experience |
|||||||||||||||||||||||||||||||||||||||||||||
playbackRate |
Object |
<optional> |
{default:1, storage:true} | allows to control the playback rate user experience |
|||||||||||||||||||||||||||||||||||||||||||||
textTrackLanguage |
Object |
<optional> |
{default:false, storage:true} | allows to control the subtitle user experience |
|||||||||||||||||||||||||||||||||||||||||||||
textTrackSizeLevel |
Object |
<optional> |
{default:1, storage:true} | allows to control the subtitle size level |
|||||||||||||||||||||||||||||||||||||||||||||
volume |
Object |
<optional> |
{default:1, storage:true} | allows to control the volume user experience |
(constant) MOUSE_LEAVE
The mouseleave event is fired at an Element when the cursor of a pointing device (usually a mouse) is moved out of it.
- Source:
- See:
(constant) MOUSE_MOVE
The mousemove event is fired at an element when a pointing device (usually a mouse) is moved while the cursor's hotspot is inside it.
- Source:
- See:
(constant) MOUSE_UP
The mouseup event is fired at an Element when a button on a pointing device (such as a mouse or trackpad) is released while the pointer is located inside it. mouseup events are the counterpoint to mousedown events.
- Source:
- See:
PlayerConfiguration :Object
Type:
- Object
Properties:
| Name | Type | Attributes | Default | Description | |||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
analytics |
Boolean | allows to enable or disable the SRG SSR analytics |
|||||||||||||||||||||||||||||||||||||||||
chromeCastReceiver |
String | set a custom Chrome Cast Receiver app id |
|||||||||||||||||||||||||||||||||||||||||
container |
String | query selector of the HTMLElement where the player will be created |
|||||||||||||||||||||||||||||||||||||||||
debug |
Boolean | debug mode to show logs in dev console through videojs logs |
|||||||||||||||||||||||||||||||||||||||||
endScreenPlaylist |
Array.<Object> | allows to provide a custom end screen playlist, must be an array with 18 items Properties
|
|||||||||||||||||||||||||||||||||||||||||
userReport |
Object |
<optional> |
allows to control the display of the error report button Properties
|
||||||||||||||||||||||||||||||||||||||||
fillMode |
Boolean | set the layout: (true for fill, false for fluid) |
|||||||||||||||||||||||||||||||||||||||||
nextEpisodeRecommendation |
Boolean |
<optional> |
false | allows to use the recommendation service provided by Playfff |
|||||||||||||||||||||||||||||||||||||||
noUI |
Boolean |
<optional> |
false | allows to disable the player's UI |
|||||||||||||||||||||||||||||||||||||||
playerFocus |
Object | allows to set the focus to the player at initialization to use hotkeys |
|||||||||||||||||||||||||||||||||||||||||
recommendations |
Boolean | allows to show or hide the recommendation screen |
|||||||||||||||||||||||||||||||||||||||||
storageNamespace |
String | defines the player's localStorage namespace |
|||||||||||||||||||||||||||||||||||||||||
tagCommanderScriptURL |
String | defines the tagCommander script URL |
|||||||||||||||||||||||||||||||||||||||||
components |
Object | lists all component that can be shown or hidden. The value trop allow to show the component when false will hide it Properties
|
|||||||||||||||||||||||||||||||||||||||||
audioTrackLanguage |
Object | allows to control the audio track language user experience |
|||||||||||||||||||||||||||||||||||||||||
autoplay |
Object | allows to control the autoplay user experience |
|||||||||||||||||||||||||||||||||||||||||
continuousPlayback |
Object | allows to control the continuous playback user experience |
|||||||||||||||||||||||||||||||||||||||||
debugMenu |
Object | allows to display the debug option in the setting menu |
|||||||||||||||||||||||||||||||||||||||||
hd |
Object | allows to control the resource quality |
|||||||||||||||||||||||||||||||||||||||||
mute |
Object | allows to control the volume user experience |
|||||||||||||||||||||||||||||||||||||||||
playbackRate |
Object | allows to control the playback rate user experience |
|||||||||||||||||||||||||||||||||||||||||
textTrackLanguage |
Object | allows to control the subtitle user experience |
|||||||||||||||||||||||||||||||||||||||||
textTrackSizeLevel |
Object | allows to control the subtitle size level |
|||||||||||||||||||||||||||||||||||||||||
volume |
Object | allows to control the volume user experience |
(constant) SCROLL
The touchmove event is fired when one or more touch points are moved along the touch surface.
- Source:
- See:
(constant) TOUCH_CANCEL
The touchcancel event is fired when one or more touch points have been disrupted in an implementation-specific manner (for example, too many touch points are created).
- Source:
- See:
(constant) TOUCH_END
The touchend event fires when one or more touch points are removed from the touch surface.
- Source:
- See:
(constant) TOUCH_MOVE
The touchmove event is fired when one or more touch points are moved along the touch surface.
- Source:
- See:
Methods
enableTrack(obj, tracks)
Tries to activate the audio track according to the language and description properties.
- Do nothing if the language does not exist in the list of audio tracks.
- If the description property is true but no audio matches, the language is used to enable audio as default behavior.
- If the description property is false but no regular audio matches, the audio described language is used as default behavior.
Parameters:
| Name | Type | Description |
|---|---|---|
obj |
Object | contains a language and a description property |
tracks |
AudioTrackList | audio track list |
Properties:
| Name | Type | Description |
|---|---|---|
obj.language |
String | language code |
obj.description |
Boolean | true if audio described false otherwise |
- Source:
findActiveTrack(tracks) → {Object|undefined}
Find the active track.
Parameters:
| Name | Type | Description |
|---|---|---|
tracks |
Array | array of audio tracks |
- Source:
Returns:
the active track or undefine if no track is active
- Type
- Object | undefined
findAllTracksByLanguage(language, tracks) → {Array}
Find all audio tracks by language regardless of type.
Parameters:
| Name | Type | Description |
|---|---|---|
language |
* | language code |
tracks |
Array | array of audio tracks |
- Source:
Returns:
- Type
- Array
findAudioDescriptionTrackByLanguage(language, tracks) → {Object|undefined}
Find an audio described track by language.
Parameters:
| Name | Type | Description |
|---|---|---|
language |
String | language code |
tracks |
Array | array of audio tracks |
- Source:
Returns:
the track or undefined if no audio described track is found.
- Type
- Object | undefined
findTrackByLanguage(language, tracks) → {Object|undefined}
Find a track by language.
Parameters:
| Name | Type | Description |
|---|---|---|
language |
String | language code |
tracks |
Array | array of audio tracks |
- Source:
Returns:
the track or undefined if no track correspond to the language.
- Type
- Object | undefined
format(obj) → {Object|undefined}
Format an object or AudioTrack to .
Parameters:
| Name | Type | Description |
|---|---|---|
obj |
Object | AudioTrack |
Properties:
| Name | Type | Description |
|---|---|---|
obj.kind |
String | indicates the category of the audio |
obj.language |
String | language code |
- Source:
Returns:
returns an object containing the language and description properties, undefined otherwise
- Type
- Object | undefined
hasAudioDescriptionLanguageTrack(language, tracks) → {Boolean}
Check if a specific language is audio described.
Parameters:
| Name | Type | Description |
|---|---|---|
language |
String | language code |
tracks |
Array | array of audio tracks |
- Source:
Returns:
true if and audio described track exists false otherwise
- Type
- Boolean
hasLanguageTrack(language, tracks) → {Boolean}
Check if a language exists in a track list.
Parameters:
| Name | Type | Description |
|---|---|---|
language |
String | language code |
tracks |
Array | array of audio tracks |
- Source:
Returns:
true if the language exists false otherwise
- Type
- Boolean
isAudioDescription(kind) → {Boolean}
Check if the kind is of audio description type.
Parameters:
| Name | Type | Description |
|---|---|---|
kind |
String | indicates the category of the audio |
- Source:
Returns:
true if audio description, false otherwise
- Type
- Boolean
isLanguageOnlyAudioDescription(language, tracks) → {Boolean}
Check if the track list contains only the audio description for a given language.
Parameters:
| Name | Type | Description |
|---|---|---|
language |
String | language code |
tracks |
Array | array of audio tracks |
- Source:
Returns:
true if it only contains audio description, false otherwise
- Type
- Boolean
isRegularTrack(kind) → {Boolean}
Check if the kind is of regular audio type.
Parameters:
| Name | Type | Description |
|---|---|---|
kind |
String | indicates the category of the audio |
- Source:
Returns:
true if regular audio, false otherwise
- Type
- Boolean
reportUserActivity(player, trackUserActivity) → {Boolean|undefined}
Activate or deactivate the inactivity timeout.
Allows to control the display of the player's UI.
Parameters:
| Name | Type | Description |
|---|---|---|
player |
VideoJsPlayer | |
trackUserActivity |
Boolean |
- Source:
Returns:
- Type
- Boolean | undefined
sanitizeParameter(value) → {Object}
Sanitize the parameter.
Parameters:
| Name | Type | Description |
|---|---|---|
value |
Object |
- Source:
Returns:
- Type
- Object