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

Do not use vimeo API to play vimeo hosted video files. #597

Conversation

rin
Copy link
Contributor

@rin rin commented Mar 15, 2019

If you have a vimeo PRO account, you get direct urls for your videos. Unfortunately, react-player will try to play them with the vimeo player.

This was fixed for mp4 files in this commit:
6f10f61

The issue is still there for m3u files though – e.g.
https://player.vimeo.com/external/268931179.m3u8?s=4d7bec5817b90f9227891dd828e32deb91fa01e7.

@rin rin force-pushed the issue/do-not-use-vimeo-api-for-vimeo-hosted-m3u-files branch from d9dffee to 18cc786 Compare March 15, 2019 15:20
src/players/Vimeo.js Outdated Show resolved Hide resolved
@thunderkid
Copy link

Hi. I'm glad I just saw this. I was about to spend some unpleasant time figuring out some hacks to make the vimeo player behave more consistently. I didn't realize vimeo files could actually be accessed with a non-vimeo player instead.

Is there an example of this we could add to the demo? (I'd be happy to provide a PR if I just had a link.) Doing a quick search I couldn't even find a vimeo pro file I could use as a test case but I might just not know what I'm supposed to be looking for. Thanks.

@cookpete
Copy link
Owner

I don't have Vimeo Pro, but if anyone wants to contribute an example of a direct URL, they are more than welcome!

@rin
Copy link
Contributor Author

rin commented Mar 18, 2019

@thunderkid I don't really think it needs to be added to the demo, because in the end it's just a video file that happens to be hosted on vimeo. The url I used in my test is the only one I have right now (don't have access to the vimeo Pro account myself) and when you change the regex of the vimeo player, it works in the demo, too.

@schuylr
Copy link

schuylr commented May 4, 2019

@cookpete The m3u8 extension is the most common problem right now. Pro links are basically various qualities of MP4 videos and HLS formats.

Here are all of the video formats that we got from the Direct URLs page on our Vimeo Pro account. I think the quality of the MP4 formats are determined by the profile_id param and the hd/sd portion of the URL:

https://player.vimeo.com/external/231900993.hd.mp4?s=<redacted>&profile_id=175

https://player.vimeo.com/external/231900993.hd.mp4?s=<redacted>&profile_id=174

https://player.vimeo.com/external/231900993.sd.mp4?s=<redacted>&profile_id=165

https://player.vimeo.com/external/231900993.sd.mp4?s=<redacted>&profile_id=164

https://player.vimeo.com/external/231900993.m3u8?s=<redacted>

Co-Authored-By: rin <mail@rin-raeuber.com>
@rin
Copy link
Contributor Author

rin commented May 6, 2019

@schuylr Thanks for looking that up, I had completely forgotten about the issue. With this information, it seems to be a sensible (and future-proof) approach to just check for any file extension. I updated the PR with @cookpete s suggestion.

@cookpete cookpete merged commit 2465edb into cookpete:master Jun 5, 2019
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.

4 participants