Chromecast Stream Appending

Playlists with stream appending while casting

Demonstrate adding new streams to the Chromecast queue while casting.

function app() {
  return {

    init() {
      //do init stuff here
    },
    addCastStream(e) {
         player.load({
            "castInfo": {
              "title": "Elephants Dream",
              "subtitle": "Subtitle",
              "images": [
                {
                  "url": "https://electroteque.org/flowplayer/flowplayer7/chromecast/images/stills/ed_still.jpg"
                }
              ]
            },
            "sources": [{'type': 'video/webm', 'src': 'https://videos.electroteque.org/bitrate/elephants_dream_2000k.webm'}, {'type': 'video/mp4', 'src': 'https://videos.electroteque.org/bitrate/elephants_dream_2000k.mp4'}, {'type': 'video/ogg', 'src': 'https://videos.electroteque.org/bitrate/elephants_dream_2000k.ogv'}]
        });     
    }
  }
}
    
  <div class="flex w-full">
          <div id="addstream" class="">
              <a class="fp-prev">prev</a>
              <a class="fp-next">next</a>
          </div>
  </div>
  <script type="text/javascript">
  	var player = flowplayer("#addstream", {
    "chromecast": {
        "castAppID": "5C78621A",
        "debug": true
    },
    "playlist": [
        {
            "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//flowplayer/flowplayer7/chromecast/images/stills/bbb_still.png"
                    }
                ],
                "subtitle": "Subtitle",
                "title": "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"
                }
            ]
        }
    ],
    "share": false
});
  </script>