Example:

location : {
vr: 'MY_VR_FOLDER/my_bitmovinplayer-vr.js',
ui: 'MY_JS_FOLDER/my_bitmovinplayer-ui.js',
ui_css: 'MY_CSS_FOLDER/my_bitmovinplayer-ui.css',
cast: 'https://www.gstatic.com/cv/js/sender/v1/cast_sender.js?loadCastFramework=1',
google_ima: 'https://imasdk.googleapis.com/js/sdkloader/ima3.js'
}
interface LocationConfig {
    cast?: string;
    google_ima?: string;
    serviceworker?: string;
    ui?: string;
    ui_css?: string;
}

Properties

cast?: string

The URL of the Google Cast Chrome Sender API library.

Default URL: https://www.gstatic.com/cv/js/sender/v1/cast_sender.js?loadCastFramework=1

google_ima?: string

The URL of the Google IMA Framework.

Default URL: https://imasdk.googleapis.com/js/sdkloader/ima3.js

Deprecated

Use ImaAdvertisingConfig.sdkUrl instead.

serviceworker?: string

Specifies the path, relative or absolute, to the service worker JS file.

If no URL is provided but the bitmovin-serviceworker.js module is added, the setup will fail with SETUP_SERVICE_WORKER_LOCATION_MISSING

Preconditions for the ServiceWorker to work:

  • This property has to be set to the URL of a ServiceWorker implementation
  • This file has to be placed on the same level as the serving HTML page
  • The content source used with the player has to enable CORS

Supported events when ServiceWorker is enabled:

Supported API with ServiceWorker:

Note: When using multiple player instances on the same page, every instance should use the same ServiceWorker URL for the same scope. Avoid dynamic or unique query parameters because they can trigger repeated ServiceWorker updates and setup failures such as SETUP_SERVICE_WORKER_INITIALIZATION_FAILED.

ui?: string

Specifies the path, relative or absolute, to the Bitmovin Player UI/skin JavaScript file.

Default name: bitmovinplayer-ui.js

ui_css?: string

Specifies the path, relative or absolute, to the style sheet of the Bitmovin Player UI/skin.

Default name: bitmovinplayer-ui.css