imaBridge

Docs

IMABridge

Last Modified on 2022-07-27T14:01:32.426Z

The smartclientcore IMA Bridge is designed as a drop-in replacement for the Google IMA SDK for HTML5. It can safely replace existing implementations of the IMA by using the same API methods and properties.

In this guide, therefore, only the steps required to exchange the IMA with the smartclientcore are highlighted.

_If you have not yet implemented the IMA SDK, please consider a full integration of the smartclientcore instead. This enables some additional features compared to the IMA. _

Getting Started

First step, read the guide and adapt the guide according to your personal preferences

This guide demonstrates how to integrate the Google IMA into a simple video player app.

Second step, how do we get the smartclientcore IMA Bridge to run

At the point how to import the IMA SDK, we replace the *.ima3.js with the smartclientcore.ima-bridge-min.js.

index.html

...
    </div>
        <script src="smartclientcore.ima-bridge-min.js"</script>
        <script src="yourPersonalScript.js"></script>
    </body>
</html>

Third step, ensure that video not thrown out

We need to comment out this place videoElement.load() on ads.js point AdsManager.

// Initialize the container. Must be done via a user action on mobile devices.
//videoElement.load();
adDisplayContainer.initialize();

This prevents the video from being discarded without knowing whether the ad-server returns ads or not. If no ads are being returned, there is no need to interrupt content delivery.