DAI - Google Dynamic Ad Insertion

Dynamic Ad Insertion (DAI) is a server-side video ad technology that enables you to serve video ads into a live stream or VOD. Serving ads without the need to reload video allows for maximum smooth playback and the most enjoyable viewing experience. Adblockers are unable to block just the ads but the whole content instead. If viewers want to enjoy the content, they will have to disable their ad blocker.
The latest version of the IMA Plugin for Video.js includes support for DAI ads.

The example above demonstrates a VOD stream with DAI integration for server-side ad insertion using a videojs player with the Nuevo and Ima plugins.
Code snippet
<video id="myplayer" class="video-js" poster="//domain.com/path/to/poster.jpg" controls preload="auto"></video>

<!-- Load video.js and plugins -->
<script src="//imasdk.googleapis.com/js/sdkloader/ima3_dai.js"></script>
<script src="/video-js/video.min.js"></script>
<script src="/video-js/nuevo.min.js"></script>
<!-- Load latest Ima plugin script -->
script src="https://cdn.jsdelivr.net/npm/videojs-ima@2.3.0/dist/videojs.ima.min.js"></script>

<script>
var player = videojs('myplayer', {license: "key"});
player.nuevo(nuevoOptions);

<!-- Example of a Live and VOD stream using IMA's samples streams -->
const vodStream = new window.videojsIma.VodStream('hls', '2548831', 'tears-of-steel');
const liveStream = new window.videojsIma.LiveStream('hls', 'sN_IYUG8STe1ZzhIIE_ksA');

var imaOptions = {
fallbackStreamUrl: 'http://storage.googleapis.com/testtopbox-public/video_content/bbb/master.m3u8',
// Include other IMA DAI options as needed.
}
player.imaDai(imaOptions);
</script>
The code example above refers to the VOD stream type. Below, you can see the declaration for the live stream.For more details about DAI integration and the plugin's DAI options, check Github's Googleads source.
You need to have Google's Ad Manager 360 Advanced contract. Enabling Google DAI playback is a technical process, we strongly advise working with a developer to enable Google DAI playback for your web player.