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

Support all embed URLs dynamically #345

Closed
lastmjs opened this issue Aug 24, 2016 · 4 comments
Closed

Support all embed URLs dynamically #345

lastmjs opened this issue Aug 24, 2016 · 4 comments
Assignees
Labels

Comments

@lastmjs
Copy link

lastmjs commented Aug 24, 2016

This idea would work well especially if this library were a web component, like mentioned here. I'm trying to support a video player where I don't know until runtime which type of URL is going to be inserted into the player. I'm going to have to do all of the logic myself, parsing the URLs to see if they are from YouTube, Vimeo, or just a plain file, and then I'll have to extract the ids. It would be great if the player supported any URL, for example:

<plyr-element src="https://vimeo.com/179671273"></plyr-element>

or

<plyr-element src="https://www.youtube.com/watch?v=S1ql2eNo2BY"></plyr-element>

Both of the above would work, and all of the logic would be contained inside of the component.

@sampotts
Copy link
Owner

Good idea and should be pretty straight forward with a bit of Regex. I think even the Vimeo new API will parse a URL anyway. I'll give it a go. Cheers 👍

@sampotts sampotts self-assigned this Aug 25, 2016
@lastmjs
Copy link
Author

lastmjs commented Aug 25, 2016

In the mean time, I'm actually using this: https://github.com/Zod-/jsVideoUrlParser
Might help if you don't want to deal with all of the work yourself.

@sampotts sampotts changed the title Support all URLs dynamically Support all embed URLs dynamically Oct 23, 2016
@sampotts
Copy link
Owner

sampotts commented Nov 2, 2016

@gurupras has done a PR for this and I've just modified it slightly to support Vimeo also. Will be pushing to master shortly and deploy 2.0.10 👍

sampotts pushed a commit that referenced this issue Nov 2, 2016
- Added seek event fixes for Vimeo and YouTube (fixes #409)
- Added support for embed URLs rather than ID only (fixes #345)
@sampotts
Copy link
Owner

sampotts commented Nov 2, 2016

Added in v2.0.10:
https://github.com/Selz/plyr/releases/tag/v2.0.10 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants