1
votes

I've registered my app and trying to cast a hls video from ios app to TV. It works with other formats like mp4. In the code I've mentioned the streamtype as GCKMediaStreamTypeLive and contentType as @"application/x-mpegURL". The iOS code used is referenced from the sample app "HelloVideoGoogleCast". And I've deployed the receiver's html file from the following sample, https://github.com/googlecast/cast-custom-receiver.

Am I missing something ? Is there any sample app available for playing HLS video on ChromeCast device ? Why is it not playing the hls video type ?

1
I don't know what sample code "HelloVideoGoogleCast" you are referring to. The cast-custom-receiver has HLS content in it; follow the steps there. - Ali Naddaf
I'm getting this error in the chromecast console i.e, <ChromeCastIP:9222>. XMLHttpRequest cannot load musicvideohls.erosnow.com/hls/music/3/1005303/musicvideo/…. No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'tst.erosnow.com' is therefore not allowed access. - Pradeep Rajkumar
As the error is saying, you do not have CORS headers present and set up correctly, read our documentation (developers.google.com/cast/docs/player) - Ali Naddaf
Yes, CORS was the issue. Fixed it by storing the Receiver file in the same place where the content is placed. - Pradeep Rajkumar
@FayzaNawaz whats the error you are getting ? Perhaps, create a separate question(add screenshots/error codes) for this issue and tag people. - Pradeep Rajkumar

1 Answers

0
votes

I received the "Access-Control-Allow-Origin" header error even when CORS headers was present and set up correctly. Turned out a simple reboot of the Chromecast device from the Chromecast iOS app fixed the issue.