To integrate the midroll plugin to your existing videojs player follow the below steps.
<link rel="stylesheet" href="https://vgrplayer.s3.ap-south-1.amazonaws.com/midroll-test-player/vidgyor-vjs_v3.css">
<script src="https://vgrplayer.s3.ap-south-1.amazonaws.com/midroll-player/ads.min.js"></script>
<script src="https://vgrplayer.s3.ap-south-1.amazonaws.com/midroll-player/midroll.min.js"></script>
var myconf = {
'adsm': 'ext',
'ads': {
"mobile": {
"url": "https://pubads.g.doubleclick.net/gampad/ads?sz=640x480&iu=/124319096/external/single_ad_samples&ciu_szs=300x250&impl=s&gdfp_req=1&env=vp&output=vast&unviewed_position_start=1&cust_params=deployment%3Ddevsite%26sample_ct%3Dskippablelinear&correlator=[timestamp]"
},
"desktop": {
"url": "https://pubads.g.doubleclick.net/gampad/ads?sz=640x480&iu=/124319096/external/single_ad_samples&ciu_szs=300x250&impl=s&gdfp_req=1&env=vp&output=vast&unviewed_position_start=1&cust_params=deployment%3Ddevsite%26sample_ct%3Dskippablelinear&correlator=[timestamp]"
}
},
"channelid":"mktest",
"midrollErrorFallback":false,
"timeForNextMidroll":5,
"pollerStartDelaySecs":5,
"midrolltimer":true,
"midrolltimerSeconds":5,
"midrolltimerMessage":"Ad start soon",
"midrollErrorFallbackBannerSlot":"/106213651/Test_Display_300x250",
};
player.midrollPlugin(myconf);