Player has multiple options, which can be setup by configuration object. Please click on field name for see more detail.
Field name | Type | Description |
---|---|---|
dataSource | string | URL pointing to json file with media data. |
dataProvider | object | JavaScript object with media data. |
advertisement | object | Configuration object for player advertisement. |
freewheel | object | Configuration object for freewheel advertisement. |
ima | object | Configuration object for Google IMA advertisement. |
autoplay | bool | Indicates if player should play video after player load. |
mute | bool | Indicates if player should start playback with muted sound. |
volume | number | Initial video volume: 0.0 - muted, 1.0 - full volume. |
startTime | float | Indicates initial start time of video. |
qualitySelectionEnabled | bool | Indicates if quality selection should be enabled in player. |
qualityLabelType | string | Selects if bitrate or resolution should be on quality list. |
qualityInitialBandwidthKbs | number | Selects initial quality bitrate on playback start. |
showSkinOnInit | bool | Indicates if player skin should be visible at player start. |
shareButtons | string | List of comma separated social button names. |
hideUIElements | string | List of comma separated elements to disable/hide. |
endSplash | string | Name of end splash view to use. |
subtitles | string | Default subtitles language in ISO 3166-1 language code. |
audio | string | Default audio language in ISO 3166-1 language code. |
locale | string | Language code for translating player messages. |
dvrWindowStartTime | float | Head constraint for DVR window for live streams. |
dvrWindowEndTime | float | Tail constraint for DVR window for live streams. |
dvrMinLenForSeekbar | float | Optional - Defines minimal DVR length for showing seek bar. |
isDvrWallTimeMode | bool | Indicates if wall-time mode is enabled for live stream. |
iosInlineVideo | bool | Indicates if video should be inlined for iOS. |
bradmaxAnalytics | bool | Configuration of GDPR for users statistics. |
gdprAgreeRequired | bool | Indicates if GDPR agree is required for users statistics. |
gdprAgreeForCookie | bool | Indicates if agree for cookie is present for users stats. |
googleAnalytics | object | Configuration of Google Analytics statistics. |
liveStream | object | Additional settings for live stream transmission. |
skinColor | string | Use for custom player skin color (deprecated). |
skin | object | Player skin configuration object. |
logoFile | string | Image URL for custom player logo. |
logoLink | string | Page URL, where user should land after clicking logo. |
logoLinkTarget | string | Page target after clicking player logo. |
logoAutohide | bool | Optional - Indicates if logo should hide with player skin. |
logoYPosition | string | Optional - Vertical logo configuration ("top", “bottom”). |
logoXPosition | string | Optional - Horizontal logo configuration ("left", “right”). |
logoAutohide | bool | Indicates if logo should hide during hiding skin. |
logoVisibleDuringAdPlayback | bool | Indicates if logo should be visible during ad playback. |
pictureInPictureButtonVisible | bool | Optional - Enables additional button for Picture-in-Picture. |
videoCastEnabled | bool | Optional - Enables video casting for Chromecast and AirPlay. |
fullscreenEnabled | bool | Optional - Enables video fullscreen feature. |
playbackRateEnabled | bool | Optional - Enables changing video playback ratio feature. |
contextMenuDisabled | bool | Optional - Disables player context menu feature. |
showErrorDetails | bool | Optional - Enabling/Disabling showing error details. |
saveBandwidthMode | bool | Optional - Enabling/Disabling network bandwidth saving mode. |
fullscreenOrientationLock | string | Optional - Enables fullscreen orientation lock feature. |
Data type: string
Configuration path: .dataSource
Description: URL pointing to json file with media data. For structure of media data see section Media object.
NOTE: If json file/service is on other domain than web page with player, then CORS headers are required response load. In other case browser will trigger an error that JavaScript has no permissions for loading them.
Example of json response:
{
"dataProvider": {
"title": "Example title",
"duration": 734.097415,
"source": [
{
"contentType": "movie",
"url": "https://example.com/video.mpd",
"bitrate": 191999,
"width": 1280,
"height": 534
}
],
"splashImages": [
{
"url": "https://example.com/startsplash.jpg",
"width": 955,
"height": 397
}
]
}
}
Data type: object or array
Configuration path: .dataProvider
Description: Configuration defining what and how multimedia (video) should be displayed by the player. For more details see Data Provider documentation pages.
Examples of Data Provider configuration:
Data type: object
Configuration path: .advertisement
Description: Configuration object defining which and how should be displayed advertisements by player. For more details see Advertisements documentation pages.
Data type: object
Configuration path: .freewheel
Description: Configuration object defining which and how freewheel advertisements should be displayed by player. For more details see Freewheel section.
Data type: object
Configuration path: .ima
Description: Configuration object defining which and how Google IMA advertisements should be displayed by player. For more details see Google IMA section.
Data type: bool
Configuration path: .autoplay
Description: Field indicates if player should start playback just after player setup. If “true” then video starts just after player setup. In other case user has to click “play” button for playback. By default option is disabled.
NOTE: This option is not working on mobile devices. All mobile devices require user action for starting video playback. It is limitation of mobile device platforms, which cannot be bypass.
Data type: bool
Configuration path: .mute
Description: Field indicates if player should be muted at start. If “true” then video starts with muted sound.
NOTE: Currently “autoplay” is blocked by most of browsers. It is possible to bypass this constraint, when video is muted. Use this option ("muted": true) for automatic starting video playback.
Example of use:
{
"autoplay": true,
"mute": true,
"dataProvider": { "source": [ { "url": "https://example.com/video.mpd" } ]}
}
Data type: number
Configuration path: .volume
Description: Initial video volume: 0.0 - muted, 1.0 - full volume.
Example of use:
{
"volume": 0.7,
"dataProvider": { "source": [ { "url": "https://example.com/video.mpd" } ]}
}
Data type: float
Configuration path: .startTime
Description: This field define initial time of video, where playback should start. For ordinary streams it is time of video, for live events streaming it is timestamp (in seconds, with fraction of second).
Example of use:
{
"startTime": 120.66,
"dataProvider": { "source": [ { "url": "https://example.com/video.mpd" } ]}
}
Data type: bool
Configuration path: .qualitySelectionEnabled
Description: This field enable / disable possibility for user to change video quality - if available for played media. If set to “true” then button with quality selection will be visible on player. In other case selection will be hidden and player will choose quality automatically. Default value for this field is "true".
Example:
{
"qualitySelectionEnabled": true,
"dataProvider": { "source": [ { "url": "https://example.com/video.mpd" } ]}
}
Data type: string
Configuration path: .qualityLabelType
Description: This field choose if bitrate or screen resolution, should be present on quality selection list.
Value | Description |
---|---|
resolution | Resolution will be presented on quality selection list (eg. 480p, 720p) |
bitrate | Bitrate will be presented on quality selection list (eg. 600k, 1200k). |
Default value: “resolution”
Example:
{
"qualityLabelType": 'bitrate',
"dataProvider": { "source": [ { "url": "https://example.com/video.mpd" } ]}
}
Data type: number
Configuration path: .qualityInitialBandwidthKbs
Description: This field choose initial bitrate for player, when there is no knowledge about user internet connection speed. This value has only affect on playback start. Later quality will be adjusted to user connection. Value is defined in [kb/s].
Tip: By setting this parameter you can adjust player start behavior. By setting:
Value | Description |
---|---|
0 | Player will start as soon as possible, but with lower quality at begin - good for Live content. |
20000 | Player will load longer, but with better quality from beginning - good for VOD content. |
Default value: 1000 (1Mb/s, 125kB/s)
Example:
{
"qualityInitialBandwidthKbs": 100,
"dataProvider": { "source": [ { "url": "https://example.com/video.mpd" } ]}
}
Data type: bool
Configuration path: .showSkinOnInit
Description: When option enabled then player skin is visible after player setup and user do not need to click / tap / hover with mouse over player for showing player controls. By default this option is disabled.
Data type: string
Configuration path: .shareButtons
Description: List of comma separated social button names, which should be presented on player screen.
Value | Description |
---|---|
embed | Show pop up window with player embed code. |
Open system default email client. | |
Open Facebook share page with media url address and title. | |
Open Twitter share page with media url address and title. | |
Open LinkedIn share page with media url address and title. |
Example:
{
"shareButtons": "embed,facebook,twitter",
"dataProvider": { "source": [ { "url": "https://example.com/video.mpd" } ]}
}
Check skin.share to see how to apply custom icons for share buttons.
DEPRECATED in favors of fullscreenEnabled
Data type: string
Configuration path: .hideUIElements
Description: List of comma separated elements names to hide in player. Currently only: “fullscreenButton” support this feature.
Value | Description |
---|---|
fullscreenButton | Button for opening player in fullscreen mode. |
Example:
{
"hideUIElements": "fullscreenButton",
"dataProvider": { "source": [ { "url": "https://example.com/video.mpd" } ]}
}
Data type: string
Configuration path: .endSplash
Description: Name of end splash view to use. Below are list of available values. By default ‘reload’ is selected.
Value | Description | Preview |
---|---|---|
reload | Default value. | |
social | Available when “shareButtons” data is present in player configuration, else default ‘reload’. | |
countdown | Available when “playList” data is present in provided media object, else default ‘reload’. | |
tiles | Available when “playList” data is present in provided media object, else default ‘reload’. |
Data type: string
Configuration path: .subtitles
Description: Defines default language for subtitles. When defined this language will be automatically selected, when subtitles for this language are present. Language is defined as two letters (alpha-2) ISO 3306-1 language code (for eg. “fr” for France).
{
"subtitles": "fr",
"dataProvider": { "source": [ { "url": "https://example.com/video.mpd" } ]}
}
Data type: string
Configuration path: .audio
Description: Defines default audio track language. When defined this language will be automatically selected, when audio track for this language is present. Language is defined as two letters (alpha-2) ISO 3306-1 language code (for eg. “fr” for France).
{
"audio": "fr",
"dataProvider": { "source": [ { "url": "https://example.com/video.mpd" } ]}
}
Data type: string
Configuration path: .locale
Description: Defines language code, which should be used for player messages on player skin (eg. error message). Default: 'en’. Available values: da, en, fi, pl, no, sv
{
"locale": "da",
"dataProvider": { "source": [ { "url": "https://example.com/video.mpd" } ]}
}
Data type: float
Configuration path: .dvrWindowStartTime
Description: This option is only for live streams with DVR window. It is additional constraint for it. When unix timestamp defined for this option then user is not able to seek before this moment. For user, video starts after this time and he will be not aware that available DVR window is wider.
{
"dvrWindowStartTime": 1537444800,
"dataProvider": { "source": [ { "url": "https://example.com/live_stream_with_dvr.m3u8" } ]}
}
Data type: float
Configuration path: .dvrWindowEndTime
Description: This option is only for live streams with DVR window. It is additional constraint for it. When unix timestamp defined for this option then user is not able to seek after this moment. For user, video ends after this time and he will be not aware that available DVR window is wider.
{
"startTime": 1537444800,
"dvrWindowStartTime": 1537444800,
"dvrWindowEndTime": 1537448400,
"dataProvider": { "source": [ { "url": "https://example.com/live_stream_with_dvr.m3u8" } ]}
}
Data type: float
Configuration path: .dvrMinLenForSeekbar
Description: Optional - Defines minimal DVR length for showing seek bar. For shorter than defined seeking will be hidden. For longer values users will be able to seek back over the DVR window to see previous video moments. It is used for overriding default values (600 sec - 10 min).
Default value: 600 sec
{
"dvrMinLenForSeekbar": 900,
"dataProvider": { "source": [ { "url": "https://example.com/live_stream_with_dvr.m3u8" } ]}
}
Data type: bool
Configuration path: .isDvrWallTimeMode
Description: Indicates if wall-time should be presented during live stream transmission. It is most useful for IP TV transmission. By default it is disabled for not confusing users for ordinary live streams.
Default value: false
{
"isDvrWallTimeMode": true,
"dataProvider": { "source": [ { "url": "https://example.com/live_stream_with_dvr.m3u8" } ]}
}
Data type: bool
Configuration path: .iosInlineVideo
Description: This option indicates if video should be inlined for iPhone devices (default true). When “iosInlineVideo” is set to false, then playback will be performed with default iOS behavior. For modr information see Apple documentation
NOTE: On iOS Safari browser setting autoplay to true and mute to true will force “iosInlineVideo” to be true event if it was set as false in player configuration.
Default value: true
{
"iosInlineVideo": true,
"dataProvider": { "source": [ { "url": "https://example.com/video.mpd" } ]}
}
Data type: object
Configuration path: .bradmaxAnalytics
Description: For more information please check Analytics documentation page.
Data type: bool
Configuration path: .bradmaxAnalytics.gdprAgreeRequired
Description: This option indicates if user agree for cookie is required. If gdprAgreeRequired:true, then cookies will not be used for users statistics and additional agree “gdprAgreeForCookie” is required for using them. If gdprAgreeRequired:false, then it is assumed that cookie can be used without user agree. This option has to be defined in “bradmaxAnalytics” settings scope - see example below.
Default value: false
{
"bradmaxAnalytics": {
"gdprAgreeRequired": true,
"gdprAgreeForCookie": true
},
"dataProvider": { "source": [ { "url": "https://example.com/video.mpd" } ]}
}
Data type: bool
Configuration path: .bradmaxAnalytics.gdprAgreeForCookie
Description: This option works together with gdprAgreeRequired option. When gdprAgreeRequired:true, then setting this option is required for using cookies for user statistics. gdprAgreeForCookie:true indicates user agree for using cookie for statistics purpose. This option has to be defined in “bradmaxAnalytics” settings scope - see example below.
Bradmax cookies names used for statistics purpose: _bamcdc, _bame, _baml .
Default value: false
{
"bradmaxAnalytics": {
"gdprAgreeRequired": true,
"gdprAgreeForCookie": true
},
"dataProvider": { "source": [ { "url": "https://example.com/video.mpd" } ]}
}
Data type: object
Configuration path: .googleAnalytics
Description: For more information please check Google Analytics documentation page.
Data type: object
Configuration path: .skin
Description: Configuration object for rendering HTML player skin. For more details please check HTML Skin Configuration page.
DEPRECATED in favors of skin.color
Data type: string
Configuration path: .skinColor
Description: This parameter can be used to override player skin defined color. Color defined in HEX format "#RRGGBB".
{
"skinColor": "#FF0000",
"dataProvider": { "source": [ { "url": "https://example.com/video.mpd" } ]}
}
Data type: string
Configuration path: .logoFile
Description: Image URL for custom player logo. It overwrites player logo configuration - if defined.
{
"logoFile": "https://example.com/logo.png",
"dataProvider": { "source": [ { "url": "https://example.com/video.mpd" } ]}
}
Data type: string
Configuration path: .logoLink
Description: Page URL, which should be open after clicking logo on player.
Data type: string
Configuration path: .logoLinkTarget
Description: If not defined any value, then clicking logo will open target page (logoLink) in current player page. Usually it is good to define “_blank” for instruct browser to open target page in new browser tab.
{
"logoFile": "https://example.com/logo.png",
"logoLink": "http://bradmax.com",
"logoLinkTarget": "_blank",
"dataProvider": { "source": [ { "url": "https://example.com/video.mpd" } ]}
}
Clicking logo will open “http://bradmax.com” page in new tab.
Data type: bool
Configuration path: .logoAutohide
Description: Indicates if logo should hide with player skin. By default logo will be kept visible even player skin is hidden. If logoAutohide:true, then logo will hide with player skin.
Default value: false
Data type: string ("top" or "bottom")
Configuration path: .logoYPosition
Description: Vertical logo configuration. Available values: "top", “bottom”
Default value: “top”
Data type: string ("left" or "right")
Configuration path: .logoXPosition
Description: Vertical logo configuration. Available values: "left", “right”
Default value: “left”
{
"logoFile": "https://example.com/logo.png",
"logoLink": "http://bradmax.com",
"logoLinkTarget": "_blank",
"logoYPosition": "bottom",
"logoXPosition": "right",
"dataProvider": { "source": [ { "url": "https://example.com/video.mpd" } ]}
}
Logo will be displayed on bottom right corner of player (over player controls).
Data type: bool
Configuration path: .logoAutohide
Description: This option indicates if brand logo should hide with hiding skin during video playback.
Default value: (predefined in player configuration in bradmax client panel)
{
"logoAutohide": false,
"dataProvider": { "source": [ { "url": "https://example.com/video.mpd" } ]}
}
Data type: bool
Configuration path: .logoVisibleDuringAdPlayback
Description: This option indicates if brand logo should be visible during advertisement playback.
Default value: false
{
"logoVisibleDuringAdPlayback": true,
"dataProvider": { "source": [ { "url": "https://example.com/video.mpd" } ]}
}
Data type: bool
Configuration path: .pictureInPictureButtonVisible
Description: Enables additional button in player skin for enabling/disabling Picture-in-Picture mode. When PIP mode is enabled then player is detached from browser and user can watch video over other screens.
NOTE: PIP button will appear only when browser supports such feature and it can be enabled. Button appears only, when browser allows PIP mode for video. Usually after video playback start (user action is required). Button is not available for FireFox browser. FireFox browser has own Picture-in-Picture mechanics for video and it cannot be controlled by custom buttons or JavaScript.
Default value: true (when plugin is active)
Plugin active: false (by default plugin is disabled and has to be enabled in player configurator
NOTE: If player is generated thru Bradmax Admin Panel, then “Picture-in-Picture” feature must be enabled.
{
"pictureInPictureButtonVisible": true,
"dataProvider": { "source": [ { "url": "https://example.com/video.mpd" } ]}
}
Data type: bool
Configuration path: .videoCastEnabled
Description: Enables video casting for Chromecast and AirPlay technology.
When enabled:
Web player becomes a remote controller for this video.
Technological limits: AirPlay icon appears in player control bar only, when AirPlay device (eg. AppleTV) is detected in the same local network (eg. same WiFi network). Chromecast icon appears in player control bar, when browser is supporting such technology - even when no Chromecast receiver device is not detected in the same local network. Chromecast icon will appear only on secured web pages (pages hosted with HTTPS) with exception for localhost (for testing it can be HTTP).
Default value: true (when plugin is active)
Plugin active: false (by default plugin is disabled and has to be enabled in player configurator)
NOTE: If player is generated thru Bradmax Admin Panel, then “Chromecast / AirPlay” feature must be enabled.
{
"videoCastEnabled": true,
"dataProvider": { "source": [ { "url": "https://example.com/video.mpd" } ]}
}
Important note for video providers about Chromecast
Chromecast devices got more restricted CORS policy for video content than other devices. Chromecast devices are ignoring Access-Control-Allow-Origin header with wildcards “*”. Header Access-Control-Allow-Origin has to return exact receiver domain (typically https://www.gstatic.com).
More details: https://developers.google.com/cast/docs/chrome_sender/advanced#cors_requirements
Data type: bool
Configuration path: .fullscreenEnabled
Description: Enables video fullscreen feature.
Default value: true
NOTE: If player is generated thru Bradmax Admin Panel, then “Chromecast / AirPlay” feature must be enabled.
Example for disabling video fullscreen feature.
{
"fullscreenEnabled": false,
"dataProvider": { "source": [ { "url": "https://example.com/video.mpd" } ]}
}
Data type: string
Configuration path: .fullscreenOrientationLock
Description: Enables fullscreen orientation lock feature. The video player will try to utilize Screen Orientation API to rotate video player while in fullscreen mode.
Value | Description |
---|---|
any | Any of portrait-primary, portrait-secondary, landscape-primary or landscape-secondary . |
natural | The natural orientation of the screen from the underlying operating system: either portrait-primary or landscape-primary. |
landscape | An orientation where screen width is greater than the screen height. |
portrait | An orientation where screen height is greater than the screen width. |
portrait-primary | The “primary” portrait mode. |
portrait-secondary | The secondary portrait orientation. |
landscape-primary | The “primary” landscape mode. |
landscape-secondary | The secondary landscape mode. |
for more info about values please check this page.
Default value: null
NOTE: Not every device and browser supports this feature. For more information on browser support, please check this page.
{
"fullscreenOrientationLock": "landscape",
"dataProvider": { "source": [ { "url": "https://example.com/video.mpd" } ]}
}
Data type: bool
Configuration path: .playbackRateEnabled
Description: Enables changing video playback rate feature.
Default value: false
Example for enabling playback rate feature.
{
"playbackRateEnabled": true,
"dataProvider": { "source": [ { "url": "https://example.com/video.mpd" } ]}
}
Data type: bool
Configuration path: .saveBandwidthMode
Description: Enables network bandwidth saving mode. The video player will try to limit the video quality based on the dimensions of the container and lower the playback quality when running on a web page that is not visible to the user.
Default value: false
Example for enabling save bandwidth mode feature.
{
"saveBandwidthMode": true,
"dataProvider": { "source": [ { "url": "https://example.com/video.mpd" } ]}
}
Data type: bool
Configuration path: .showErrorDetails
Description: Enabling/Disabling showing error details for end user. By default this option is enabled.
Default value: true
Example for hiding error details.
{
"showErrorDetails": false,
"dataProvider": { "source": [ { "url": "https://example.com/video.mpd" } ]}
}
Data type: bool
Configuration path: .contextmenu
Description: Disables player custom context menu.
Default value: false
Example for disabling player custom context menu feature.
{
"contextMenuDisabled": true,
"dataProvider": { "source": [ { "url": "https://example.com/video.mpd" } ]}
}