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

A few instanceof errors on IE 11 and Safari #415

Closed
dancrew32 opened this issue Jun 3, 2018 · 3 comments
Closed

A few instanceof errors on IE 11 and Safari #415

dancrew32 opened this issue Jun 3, 2018 · 3 comments

Comments

@dancrew32
Copy link

dancrew32 commented Jun 3, 2018

First off, thanks for making this great player!

Getting a few error logs at my ErrorBoundary around ReactPlayer in IE 11 and Safari/Safari Mobile/Chrome for iOS.

Current version in package.json is "react-player": "^1.6.1"

IE 11:
Invalid operand to 'instanceof': Function expected

Mozilla/5.0 (Macintosh; Intel Mac OS X 10_10_5) AppleWebKit/603.3.8 (KHTML, like Gecko) Version/10.1.2 Safari/603.3.8
Mozilla/5.0 (iPhone; CPU iPhone OS 10_3_3 like Mac OS X) AppleWebKit/603.3.8 (KHTML, like Gecko) Version/10.0 Mobile/14G60 Safari/602.1

Right hand side of instanceof is not an object

While attempting to load an .mp4 file, I believe this error comes from this MediaStream instanceof check here:

https://github.com/CookPete/react-player/blob/9618272e6e4b518e493d3130b96dd2ebeb97b506/src/players/FilePlayer.js#L17-L19

I'll try and do a bit more debugging, but was wondering if you've experienced this on similar platforms.

Should I make a PR to chain another typeof window.MediaStream !== 'undefined' before the instanceof check?

@dancrew32
Copy link
Author

Still seeing these come in on 1.6.2

@jhk115
Copy link
Contributor

jhk115 commented Jun 6, 2018

Having the same issue. But for me it's iOS 10. Works fine with iOS 11...

@dancrew32
Copy link
Author

Thanks!

david-hub024 pushed a commit to david-hub024/React_VideoPlayer that referenced this issue Dec 23, 2018
david-hub024 added a commit to david-hub024/React_VideoPlayer that referenced this issue May 23, 2020
albanqoku added a commit to albanqoku/react-player that referenced this issue Feb 24, 2021
Webmaster1116 added a commit to Webmaster1116/video-player that referenced this issue May 20, 2021
webmiraclepro added a commit to webmiraclepro/video-player that referenced this issue Sep 9, 2022
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