Libs
Object containing the external libraries' url lazy loaded only when needed by DIVA Web SDK.
The following block of code is an example of value pointing to public CDNs.
{
// video libraries
hlsJs: 'https://cdn.jsdelivr.net/npm/hls.js@1.5.7',
shaka: 'https://cdnjs.cloudflare.com/ajax/libs/shaka-player/4.11.2/shaka-player.compiled.js',
mux: 'https://cdnjs.cloudflare.com/ajax/libs/mux.js/6.2.0/mux.min.js',
// Advertisement
googleIMA: 'https://imasdk.googleapis.com/js/sdkloader/ima3.js',
googleDAI: 'https://imasdk.googleapis.com/js/sdkloader/ima3_dai.js',
// Chromecast (RW only)
googleCast: 'https://www.gstatic.com/cv/js/sender/v1/cast_sender.js?loadCastFramework=1',
// Used for 360 videos (RW only)
threeJs: 'https://cdnjs.cloudflare.com/ajax/libs/three.js/0.148.0/three.min.js',
}
HLS.js​
Hls.js is a JavaScript library that plays HLS (HTTP Live Streaming) in browsers with support for MSE (Media Source Extensions).
Diva Web is using it for HLS streaming in browsers that do not support native HLS playback (all but Safari).
Click here for more info.
Shaka Player​
Shaka Player is an open-source JavaScript library for adaptive video streaming, supporting DASH and HLS.
Diva Web is using it for DASH streaming.
Click here for more info.
Mux.js​
Mux.js is a JavaScript library for creating and parsing ISO BMFF (MP4) media files.
It is used with Shaka Player for DASH streaming with a particular type of closed captions: CEA-608.
Click here for more info.
Google IMA SDK​
Google IMA (Interactive Media Ads) SDK allows you to integrate video ads into your web-based video content.
Diva is using it for client-side ad insertion.
Click here for more info.
Google DAI SDK​
Google DAI (Dynamic Ad Insertion) SDK is used for server-side ad insertion in live and on-demand video content.
Diva is using it for server-side ad insertion.
Click here for more info.
Google Cast SDK (RW only)​
Google Cast SDK allows to support casting of your web content to Chromecast and other Cast-enabled devices.
Diva is using it for Chromecast integration. To enable Chromecast support, add also the chromecastAppID
in the videoCast section of the settings file.
Click here for more info.
Three.js (RW only)​
Three.js is a JavaScript library that makes it easy to create 3D graphics and 3D experiences in the browser.
Diva is using it for 360 videos.
Click here for more info.
Disable loading of third-party libraries​
Diva allows disabling the loading of a third-party library by inserting the value false
(boolean) instead of the string containing the library's URL.
By doing so, if Diva needs the relative library, it assumes that the library has already been loaded and avoids loading it again.
This can improve startup performances.
Note: It is the integrator's responsibility to ensure the preloading of the necessary libraries.
Example disabling loading for Shaka and Mux
{
// video libraries
hlsJs: 'https://cdn.jsdelivr.net/npm/hls.js@1.5.7',
shaka: false,
mux: false,
// Advertisement
googleIMA: 'https://imasdk.googleapis.com/js/sdkloader/ima3.js',
googleDAI: 'https://imasdk.googleapis.com/js/sdkloader/ima3_dai.js',
// Chromecast (RW only)
googleCast: 'https://www.gstatic.com/cv/js/sender/v1/cast_sender.js?loadCastFramework=1',
// Used for 360 videos (RW only)
threeJs: 'https://cdnjs.cloudflare.com/ajax/libs/three.js/0.148.0/three.min.js',
}