Skip to content

Require CORS for HLS and DASH media formats #6468

@annevk

Description

@annevk

We've had a bit of a discussion exploring manifest-based media formats in annevk/orb#23. In particular, both HLS and DASH are resources that effectively list a bunch of other resources to fetch that when composed result in media. I think the effective conclusions of that thread are as follows:

  • If the media element gets an "opaque" response that's HLS or DASH, treat it as a network error. This shouldn't really be possible with (C)ORB so maybe it can be an assert, except that https://tools.ietf.org/html/rfc8216#section-4 suggests HLS might do path extension matching(!). So I think it's possible for a resource to somehow make its way through https://github.com/annevk/orb and get identified as HLS, if implementations indeed do such a thing. There's such a path for DASH as well, but I think we should add application/dash+xml to the (C)ORB blocklist and if media elements require a MIME type for DASH it should then not be possible to get such an "opaque" response.
  • Furthermore, we should require that any fetches that HLS and DASH resources want user agent to make use "cors" as request mode.

cc @whatwg/media @acolwell

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions