3

I'm trying to stream hls(adaptive-streams) with the google-cast sdk. The integration works fine when used with the sample big_buck_bunny sample link. But the load() command fails when we provide a live url. It returns following error: {statusCode=SERVICE_MISSING, resolution=null}. We have the google_play_store installed on the device. Also the streams are CORS supported and we provide the respective content-type also. We are using a sample Cutome_receiver which works well with sample links. Registration process is also completed properly. Any help will be highly appreciated.

7
  • Does it happen with a Styled or the Default receiver?
    – Ali Naddaf
    Commented Apr 21, 2014 at 14:53
  • @AliNaddaf : Its with Styled custom receiver.
    – Prati
    Commented Apr 22, 2014 at 6:16
  • we are also using the Media Player Library support with this custom receiver
    – Prati
    Commented Apr 22, 2014 at 7:03
  • 1
    My question was whether that issue happens with the Styled receiver that Google provides, not custom one; our Styled receiver (or default receiver for that matter) supports HLS and it is always a good test to see if your streams work with that or not.
    – Ali Naddaf
    Commented Apr 22, 2014 at 14:37
  • We did use google's provided default receiver, still could not load the stream. Same error. Our stream is a adaptive bit-rate stream, guess that doesn't work with default receiver.
    – Prati
    Commented Apr 22, 2014 at 16:26

1 Answer 1

1

Finally this could be solved. I am posting the answer here if it could help someone. We did lot of research to find that for streaming the urls in our case we had to explicitly provide the domain in the Origin: header of CORS. For example: Normally while adding CORS support we provide Origin header as follows

Access-Control-Allow-Origin: *

which means that the resource can be accessed by any domain in a cross-site manner.

But may be due to Streaming CDNs restricting the source of videos to be from particular domains, we couldn't access it with the above setting. On changing the Origin in the CORS header to the domain name where the videos were hosted, We could finally stream the videos.

EX: If the resource owners wished to restrict access to the resource to be only from http://foo.example, they would send back:

Access-Control-Allow-Origin: http://foo.example

in the CORS header.

This might not be the case in all the scenarios but was in our case.

Not the answer you're looking for? Browse other questions tagged or ask your own question.