Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add mimetype support #89

Merged
merged 1 commit into from
Oct 17, 2017
Merged

add mimetype support #89

merged 1 commit into from
Oct 17, 2017

Conversation

yocontra
Copy link
Contributor

for instances where you cant control the URL, it should support defining a mimetype in the source like every other player does

for instances where you cant control the URL, it should support defining a mimetype in the source like every other player does
@flavioribeiro
Copy link
Member

I agree we should receive the MIME but I don't know if we should check for it inside the method. It seems that RTMP doesn't have a mime (I assume it's because it's actually a protocol not a format?).

@yocontra
Copy link
Contributor Author

yocontra commented Oct 17, 2017

@flavioribeiro Doesn't have one, but seems most people have accepted rtmp/mp4 as the defacto "mimetype".

Really just trying to make this possible:

new Player({ source: 'something.com/anything?vid=something', mimeType: 'rtmp/mp4' })

I have to wrap the URL in a forwarder to make it work on an https site (new default chrome CSP crap), so I lose extensions and protocols and canPlay returns false.

Until now I've been doing this:

const orig = ContainerFactory.prototype.findPlaybackPlugin
ContainerFactory.prototype.findPlaybackPlugin = function (source, mimeType) {
  return orig.call(this, unwrap(source), mimeType)
}

where unwrap deconstructs the URL from the forwarder to the original.

@flavioribeiro flavioribeiro merged commit 47b8c6a into video-dev:master Oct 17, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants