[whatwg] Redirect handling for <audio> & <video>

Aaron Colwell acolwell at google.com
Thu Mar 3 13:15:58 PST 2011


Hi,

I was looking at the resource fetch
algorithm<http://www.whatwg.org/specs/web-apps/current-work/multipage/video.html#concept-media-load-resource>section
and fetching
resources <http://www.whatwg.org/specs/web-apps/current-work/multipage/urls.html#fetch>
sections of the HTML5 spec to determine what the proper behavior is for
handling
redirects. Both YouTube and Vimeo do 302 redirects to different hostnames
from
the URLs specified in the src attribute. It looks like the spec says that
playback should fail in these cases because they are from different
origins (Section 2.7 Fetching resources bullet 7). This leads me to a few
questions.

1. Is my interpretation of the spec correct? Sample YouTube & Vimeo URLs are
   shown below.
   YouTube : src      : http://v22.lscache6.c.youtube.com/videoplayback? ...
             redirect : http://tc.v22.cache6.c.youtube.com/videoplayback?
...

   Vimeo   : src      : http://player.vimeo.com/play_redirect? ...
             redirect : http://av.vimeo.com/05 ...

2. What about http: -> https: redirects? Some content is required to be
delivered
   only via https and this sort of redirect enforces that but isn't really a
different origin.

3. If my interpretation of the spec is correct, are there proposals to
change this
   or other specs that allow content providers to signal that these
different hostnames
   actually represent the same "origin".

Thanks for your help,
Aaron


More information about the whatwg mailing list