cookpete / react-player

A React component for playing a variety of URLs, including file paths, YouTube, Facebook, Twitch, SoundCloud, Streamable, Vimeo, Wistia and DailyMotion
https://cookpete.github.io/react-player
MIT License
9.39k stars 1.15k forks source link

Fullscreen doesn't work in mobile browser #155

Closed iam-peekay closed 7 years ago

iam-peekay commented 7 years ago

hi @CookPete - not sure if this is a known issue or something I need to configure. Fullscreen functionality works great on desktop but doesn't seem to work in mobile browsers. I tried Chrome and Safari and neither seem to work. Any chance you know why?

nikolas commented 7 years ago

Which mobile browsers and which devices have you tried this on? Fullscreen functionality on mobile OS's is a lot different than on the desktop, so I'm not surprised that there are issues.

iam-peekay commented 7 years ago

@nikolas Chrome and Safari. iOS

cookpete commented 7 years ago

Fullscreen functionality is a separate beast from the ReactPlayer library. The demo page uses screenfull.js as an example of how to use the JS fullscreen API with ReactPlayer (which is not supported by iOS or Android) and the fullscreen buttons inside the player are powered by the various different APIs for each video type, which are out of our control.

Alternatively, this might be solved by just adding the allowfullscreen attribute in the right places.

iam-peekay commented 7 years ago

@CookPete yep, feel free to close this issue. I learned that iOS Safari does not support the native Fullscreen API http://caniuse.com/#search=fullscreen (which is what screefull.js uses underneath to implement it's API).