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

YouTube videos won't play in IE #39

Closed
mandarinx opened this issue Feb 18, 2016 · 4 comments
Closed

YouTube videos won't play in IE #39

mandarinx opened this issue Feb 18, 2016 · 4 comments

Comments

@mandarinx
Copy link

IE complains about missing Promise.

I fixed it in a local install (because my deadline is in a few minutes) by installing [https://github.com/stefanpenner/es6-promise] and importing in the YouTube player. That fixed it for both IE 10 and 11.

I'd be happy to make a pull request, if you'd like.

@cookpete
Copy link
Owner

I'm not sure whether the best thing to do is to force a certain polyfill upon people, or just advise that you will need a polyfill for promises in your projects if you would like to support older browsers (much like the fetch polyfill does), although IE11 isn't exactly old..

Happy for suggestions on this.

@mandarinx
Copy link
Author

As it is now, ReactPlayer has no support for IE, at least for YouTube videos. I think you should put it in the readme if you don't want to force polyfills on people. As a user of ReactPlayer, I wouldn't mind installing an optional polyfill, but I'd like to know about it in advance.

ReactPlayer is one of multiple React-based video players, and when I did reasearch for which one to choose, I based my decision on the readme file of each project. The more information you can give in the readme, the easier it will be for others to chose one or the other.

I'd write something like:
No version of Internet Explorer supports promises. If you need support for IE, you can install any of these drop-in polyfills:

I would recommend only polyfills that wouldn't require me to do any coding, if there are any that does. I haven't checked them all.

A little bit off topic, but since we are talking about the readme file. I'd like to put in a suggestion for adding a reminder that mobile browsers don't support autoplay. This is important because it can affect how we implement the video in the website.

I have recently finished a website project where we put up a video behind a splash image. You click the image, it gets replaced with a video that starts playing automatically. This doesn't work on mobile. YouTube throws an error after some time of preloading. It looks like something is wrong. We added a simple check for the user agent string (I know, I know...) to disable autoplay for mobile browser. It adds a second step (click the splash image, then click the YouTube play button) which wasn't what we wanted. I had completely forgot about that issue until it became one.

Good work on the component! It works much better than the others. :-)

@cookpete
Copy link
Owner

Thanks for the comments @mandarinx. I've had a further look at this and actually packaging with polyfills is cleaner and less problematic than I first thought. It also fixes the confusion of specifically polyfilling webpack, but not the final compiled builds. See 6478630, which will be part of the next release and hopefully fix ReactPlayer for latest IE versions.

@cookpete
Copy link
Owner

cookpete commented Mar 5, 2016

A little bit off topic, but since we are talking about the readme file. I'd like to put in a suggestion for adding a reminder that mobile browsers don't support autoplay. This is important because it can affect how we implement the video in the website.

I've just added a quick explanation of this to the readme.

david-hub024 pushed a commit to david-hub024/React_VideoPlayer that referenced this issue Dec 23, 2018
Previously we were polyfilling using webpack, which of course only affected the demo and not the actual build
Fixes cookpete/react-player#39
david-hub024 pushed a commit to david-hub024/React_VideoPlayer that referenced this issue May 23, 2020
Previously we were polyfilling using webpack, which of course only affected the demo and not the actual build
Fixes cookpete/react-player#39
albanqoku added a commit to albanqoku/react-player that referenced this issue Feb 24, 2021
Previously we were polyfilling using webpack, which of course only affected the demo and not the actual build
Fixes cookpete/react-player#39
Webmaster1116 added a commit to Webmaster1116/video-player that referenced this issue May 20, 2021
Previously we were polyfilling using webpack, which of course only affected the demo and not the actual build
Fixes cookpete/react-player#39
webmiraclepro added a commit to webmiraclepro/video-player that referenced this issue Sep 9, 2022
Previously we were polyfilling using webpack, which of course only affected the demo and not the actual build
Fixes cookpete/react-player#39
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