How can I access the IMA-SDK of HTML5 player

In Version 8 (exactly since 8.14.0) of the Bitmovin web-player-sdk you can directly access the default Advertisings Module which is the IMA-SDK from Google.

How would you do this?

Our Player offers several callbacks for that:

Example

const playerConfig = {
  key: '<KEY>',
  advertising: {
      adBreaks: [
        {
          tag: {
            url:'<VAR-URL>',
            type: 'vast'
          },
          id: 'Ad',
          position: 'pre'
        }
      ],
      onAdsManagerAvailable : (IMAAdManager) => {
        // example of IMA AdManager usage
        IMAAdManager.addEventListener( google.ima.AdEvent.Type.AD_PROGRESS, (IMAEvent) => {
          var adProgressData= IMAEvent.getAdData();
          console.log(parseInt(adProgressData.duration)-parseInt(adProgressData.currentTime));
        });
      }
    }
};