Chromecast Ima Ads

Casting with ad break support

Casting videos with ad break support using Ima ad tags.

    <div class="flex w-full h-auto my-auto">
      <video class="video-js vjs-default-skin vjs-fluid " crossorigin="anonymous" controls="" id="ima-ads"></video>
  </div>
  <script type="text/javascript">
  	var player = videojs("ima-ads", {
    "castInfo": {
        "artwork": [
            {
                "sizes": "128x128",
                "src": "images/stills/bbb_128x128.png",
                "type": "image/png"
            },
            {
                "sizes": "512x512",
                "src": "images/stills/bbb_512x512.png",
                "type": "image/png"
            }
        ],
        "images": [
            {
                "url": "http://192.168.5.25:8000/plugins//videojs/chromecast/images/stills/bbb_still.jpg"
            }
        ],
        "subtitle": "Subtitle",
        "title": "Big Buck Bunny"
    },
    "plugins": {
        "chromecast": {
            "castAppID": "5C78621A"
        }
    },
    "sources": [
        {
            "src": "https://videos.electroteque.org/bitrate/big_buck_bunny_2000k.mp4",
            "type": "video/mp4"
        },
        {
            "src": "https://videos.electroteque.org/bitrate/big_buck_bunny_2000k.ogv",
            "type": "video/ogg"
        }
    ]
});



      player.ima( {
    "adTagUrl": "https://pubads.g.doubleclick.net/gampad/ads?sz=640x480&iu=/124319096/external/ad_rule_samples&ciu_szs=300x250&ad_rule=1&impl=s&gdfp_req=1&env=vp&output=vmap&unviewed_position_start=1&cust_params=deployment%3Ddevsite%26sample_ar%3Dpremidpost&cmsid=496&vid=short_onecue&correlator=",
    "id": "content_video"
});
  </script>