0

The cast player API provides 3 ways of streaming protocol(Hls, Dash, SmoothStreaming), if our media does not use any of these and uses progressive download, how can we incorporate our host has the updated CORS header into our media player like we would using one of the three streaming protocols,

protocol = cast.player.api.CreateSmoothStreamingProtocol(host);
window.player = new cast.player.api.Player(host);
            window.player.load(protocol);

Thanks!

abraham
  • 46,583
  • 10
  • 100
  • 152
jensiepoo
  • 571
  • 3
  • 9
  • 26
  • 1
    So to be clear, you have an adaptive stream that is not hls, dash or SmoothStreaming? What type of stream is it? – Ali Naddaf Oct 28 '15 at 18:08
  • @AliNaddaf I'm not exactly sure. All I want to do is to access an API endpoints with access url and access token in the headers set. Would all three work with regular mp4? – jensiepoo Oct 28 '15 at 18:41
  • 1
    no, those three protocols are for adaptive streams. – Ali Naddaf Oct 28 '15 at 18:49
  • 1
    If you are asking how you can add access token to the header, isn't it the same question as you asked here: http://stackoverflow.com/q/33208823/2765813 to which I already responded? – Ali Naddaf Oct 28 '15 at 19:32
  • @AliNaddaf I'm doing CORS authentication header now, and hoping to bind the host which has the CORS header with a media player. Thanks! – jensiepoo Oct 28 '15 at 19:38
  • 1
    updateSegmentRequest is for adaptive not mp4. – Ali Naddaf Oct 28 '15 at 19:48
  • @AliNaddaf Since updateSegmentRequest is only for adaptive streaming, how would we be able to pass in headers to access images, music, pdfs, etc? Is there any other way that's easier that using JQuery + AJax? Thanks for the help! – jensiepoo Oct 28 '15 at 23:12
  • I provided a couple of suggestions in the other post that you asked the same type of questions. Think about it not as a chromecast receiver but as an html5 page; what would you do if you had such page and wanted to pass headers to show a video in your `` element? Do the same thing here; it is no different. And btw, there is no native PDF support. – Ali Naddaf Oct 29 '15 at 00:43

0 Answers0