benwiley4000 / cassette

📼 A flexible media player component library for React that requires no up-front config
https://benwiley4000.github.io/cassette/styleguide
MIT License
185 stars 28 forks source link

Undefined crossOrigin doesn't work on Edge #367

Closed danielr18 closed 5 years ago

danielr18 commented 5 years ago

crossOrigin isn't a required prop. When you don't set it in the media element, the behaviour should be:

When not present, the resource is fetched without a CORS request (i.e. without sending the Origin: HTTP header), preventing its non-tainted used in elements. If invalid, it is handled as if the enumerated keyword anonymous was used. See CORS settings attributes for additional information.

However, it appears that Edge adds the crossOrigin value as undefined, which isn't neither anonymous or use-credentials and I think it's defaulting to anonymous, which in my case prevents most audio URLs from loading.

image

I'm going to make a PR to set the attribute if it isn't falsy, to avoid this issue.