Last Modified on 2022-07-18T13:10:10.108Z
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. _
This guide demonstrates how to integrate the Google IMA into a simple video player app.
At the point how to import the IMA SDK, we replace the *.ima3.js with the smartclientcore.ima-bridge-min.js.
...
</div>
<script src="smartclientcore.ima-bridge-min.js"</script></script>
</body>
</html>
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.