Chromecast Auto Session

Launch casting session on startup

Auto request cast session when available example.

    <div class="flex w-full h-auto my-auto">
      <video class="video-js vjs-default-skin vjs-fluid " crossorigin="anonymous" controls="" id="auto-session"></video>
  </div>
  <script type="text/javascript">
  	var player = videojs("auto-session", {
    "castInfo": {
        "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.ready(function() {
player.one("play", () => {
player.requestSession();
});
});
  </script>