We are trying to play HLS video on Chromecast device. We have enabled CORS. We can successfully play a normal HLS video. but we have problem with URL hashing.
We send chromecast, an url with hashing (for security purpose) Example: http://domainname.com/70000871V/70000871V.m3u8?cp=%2FsFcurrent%2F70000871V%2F*&cf=1403&e=1493&h=cbc90
The above is basically an m3u8 video index file, chromecast looks into the index file and chooses a resolution to play, when it accesses the child file, it removes the hashing provided in the url. This results in chromecast not able to access the child file because it removed the hashing paramaters in url.
Consider m3u8 file contains some files like 70000871V_iphone_med.m3u8, so when it tries to access them, it removes the hashing...
How to tell chromecast to keep the hashing parameters when it accesses the index file.
Note: This url successfully playing in Mobile device.
The Console showing the below issue:
### MEDIA ELEMENT LOAD START sample_media_receiver.html:573XMLHttpRequest cannot load http://domainname.com/s/web_vod/current/90002466V/ROTOX013V_iphone_med.m3u8. No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'http://' is therefore not allowed access. sample_media_receiver.html:1
HOST ERROR - Fatal Error: code = 3 sample_media_receiver.html:487
### MEDIA ELEMENT STALLEDvideo url: http://domainname.com/70000871V/70000871V.m3u8?cp=%2FsFcurrent%2F70000871V%2F*&cf=1403&e=1493&h=cbc90
The .m3u8 file has,
EXTM3U
EXT-X-VERSION:3
EXT-X-STREAM-INF:PROGRAM-ID=1,BANDWIDTH=2037261,CODECS="avc1.4d001f,mp4a.40.5",RESOLUTION=960x540
ROTOX013V_iphone_hi.m3u8
EXT-X-STREAM-INF:PROGRAM-ID=1,BANDWIDTH=740606,CODECS="avc1.66.30,mp4a.40.5",RESOLUTION=640x360
ROTOX013V_iphone_med.m3u8
EXT-X-STREAM-INF:PROGRAM-ID=1,BANDWIDTH=296618,CODECS="avc1.66.30,mp4a.40.5",RESOLUTION=416x234
ROTOX013V_iphone_low.m3u8
EXT-X-STREAM-INF:PROGRAM-ID=1,BANDWIDTH=5094217,CODECS="avc1.4d001f,mp4a.40.5",RESOLUTION=1280x720
ROTOX013V_ipad_hi.m3u8
How to make this?