Chromecast Playlists

Playlists with subtitles

Playlists with Chromecast Demo

Demonstrated is a detailed playlist , with subtitles. Subtitles will be configured to display while casting.

    <div class="flex w-full h-auto my-auto">
      <video class="video-js vjs-default-skin vjs-fluid " crossorigin="anonymous" controls="" id="playlists"></video>
  </div>
  <script type="text/javascript">
  	var player = videojs("playlists", {
    "plugins": {
        "chromecast": {
            "castAppID": "5C78621A"
        }
    }
});

      player.playlist( [
    {
        "castInfo": {
            "images": [
                {
                    "url": "http://192.168.5.25:8000/plugins//videojs/chromecast/images/stills/bbb_still.jpg"
                }
            ],
            "subtitle": "Subtitle",
            "title": "Big Buck Bunny"
        },
        "name": "Big Buck Bunny",
        "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"
            }
        ],
        "textTracks": [
            {
                "default": 1,
                "kind": "subtitles",
                "label": "English",
                "src": "//videos.electroteque.org/subtitles/sintel/sintel_en.vtt",
                "srclang": "en"
            },
            {
                "kind": "subtitles",
                "label": "Deutsch",
                "src": "//videos.electroteque.org/subtitles/sintel/sintel_de.vtt",
                "srclang": "de"
            },
            {
                "kind": "subtitles",
                "label": "French",
                "src": "//videos.electroteque.org/subtitles/sintel/sintel_fr.vtt",
                "srclang": "fr"
            },
            {
                "kind": "subtitles",
                "label": "Italian",
                "src": "//videos.electroteque.org/subtitles/sintel/sintel_it.vtt",
                "srclang": "it"
            }
        ]
    },
    {
        "castInfo": {
            "images": [
                {
                    "url": "http://192.168.5.25:8000/plugins//videojs/chromecast/images/stills/sintel_still.jpg"
                }
            ],
            "subtitle": "Subtitle",
            "title": "Elephants Dream"
        },
        "name": "Elephants Dream",
        "sources": [
            {
                "src": "https://videos.electroteque.org/bitrate/sintel_2000k.mp4",
                "type": "video/mp4"
            }
        ],
        "textTracks": [
            {
                "default": 1,
                "kind": "subtitles",
                "label": "English",
                "src": "//videos.electroteque.org/subtitles/sintel/sintel_en.vtt",
                "srclang": "en"
            },
            {
                "kind": "subtitles",
                "label": "Deutsch",
                "src": "//videos.electroteque.org/subtitles/sintel/sintel_de.vtt",
                "srclang": "de"
            },
            {
                "kind": "subtitles",
                "label": "French",
                "src": "//videos.electroteque.org/subtitles/sintel/sintel_fr.vtt",
                "srclang": "fr"
            },
            {
                "kind": "subtitles",
                "label": "Italian",
                "src": "//videos.electroteque.org/subtitles/sintel/sintel_it.vtt",
                "srclang": "it"
            }
        ]
    }
]);
      player.playlistUi();
  </script>