will1971 / google-cast-sdk

Automatically exported from code.google.com/p/google-cast-sdk
0 stars 0 forks source link

Fix Chromecast to meet RFC3986 5.1.3 for DASH #746

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
Chromecast does not honor a 302 redirect on the manifest, per RFC3986 section 
5.1.3:
https://www.ietf.org/rfc/rfc3986.txt

To reproduce the problem, open a DASH stream that has a 302 redirect reply for 
the manifest.

Example - Current Flow:

http://some.host.org/path/manifest.mpd returns 302 to 
http://other.host.org/path/manifest.mpd.

Subsequent requests for mp4 chunks will be:
http://some.host.org/path/chunk1.mp4
http://some.host.org/path/chunk2.mp4

If the server has been configured to 302 redirect for everything, this will 
result in each of the above chunks also having a 302 redirect. If the server 
hasn't been configured, then they will fail 404.

Example - Proposed Flow

If the manifest returns a 302, chunks listed in the manifest should be 
requested from the target 302 URL, not the original URL.

http://some.host.org/path/manifest.mpd --> 302 --> 
http://other.host.org/path/manifest.mpd.
http://other.host.org/path/chunk1.mp4
http://other.host.org/path/chunk2.mp4
(manifest update)
http://some.host.org/path/manifest.mpd --> 302 --> 
http://another.host.org/path/manifest.mpd.
http://another.host.org/path/chunk1.mp4
http://another.host.org/path/chunk2.mp4

The failure to implement this is probably due to the 302 redirect not being 
visible until recently, as the responseUrl attribute was added to the 
XMLHttpResponse object: https://xhr.spec.whatwg.org/#the-responseurl-attribute

I recently fixed this issue on the shaka-player and you can contact Joey 
Parrish @ Google for more information:
https://github.com/google/shaka-player/pull/266

Thank you very much!

Original issue reported on code.google.com by r...@colantuoni.com on 29 Jan 2016 at 7:57

GoogleCodeExporter commented 8 years ago

Original comment by jonathan...@google.com on 11 Feb 2016 at 11:54