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

Dailymotion preload always loads #261

Closed
SkinyMonkey opened this issue Oct 29, 2017 · 4 comments
Closed

Dailymotion preload always loads #261

SkinyMonkey opened this issue Oct 29, 2017 · 4 comments

Comments

@SkinyMonkey
Copy link
Contributor

SkinyMonkey commented Oct 29, 2017

With react-player 0.25.3

I added a {preload: true} for dailymotion in the config.
If i play a youtube url I get a dailymotion node playing in the background with this url:

"http://www.dailymotion.com/embed/video/x522udb?api=postMessage&autoplay=false&controls=false&endscreen-enable=false&id=f3d4b29cd79b23&origin=http%3A%2F%2Flocalhost%3A3000&start=0"

Sorry, I don't have time to investigate this for now

@cookpete
Copy link
Owner

So it turns out that preloading had been broken for a while. It was fixed in 0.25.3 but when the dailymotion player was added, a music video was used as the preload video. It should be a blank, silent video like http://www.dailymotion.com/video/x57icfs

Can I ask why you are using the preload config? It's interesting to hear about people using it and why.

@cookpete
Copy link
Owner

From the title of the issue. It sounds like you may have misunderstood what preload does. The idea is that it will load a silent, hidden dailymotion video in the background in order to "prime" the player, and not require browser focus when a dailymotion video loads at some point later on. "Dailymotion preload always loads" is sort of the point, even when playing a youtube video first.

Either way, the preload video has been updated in the 1.0.0 beta, so try installing that:

npm install react-player@next

@SkinyMonkey
Copy link
Contributor Author

SkinyMonkey commented Oct 29, 2017

I noticed in the changelog that preloading was broken but fixed in 0.25.3 that's why i thought it would be a good idea to report this.

My title was misleading.
I understood that using preload added an element in the dom playing a silent video to prevent focus problems discussed in the issue #7 and it would not bother me if it wasn't playing a track with music at the same time as the track I play.

I read the code for 0.25.3 and noticed that it's just the BLANK_VIDEO_URL at https://github.com/CookPete/react-player/blob/v0.25.3/src/players/DailyMotion.js that is pointing to a track that is not silent. That's it.

I'll use 1.0.0, thanks.

@cookpete
Copy link
Owner

Yeah it's my fault for not checking the BLANK_VIDEO_URL when the DailyMotion player was added. Hopefully you have better luck with the 1.0.0 beta.

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

No branches or pull requests

2 participants