-
Notifications
You must be signed in to change notification settings - Fork 153
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
[help wanted] Detecting fullscreen on iOS #45
Comments
Dropping this gem for you it should help you |
what is the status of this? |
@LonelyCpp Any progress here? Do you know of any other valid approach besides hooking into iOS fullscreen APIs (seen this in the other youtube & video libs)? |
Haven't found any solutions yet :( Since expo support is critical, native code is not an option |
Hi @LonelyCpp |
Hi @LonelyCpp! Any progress here? |
@LonelyCpp I found this recent comment here https://bugs.webkit.org/show_bug.cgi?id=174626 webkitfullscreenchange is dispatched on element fullscreen, not on video fullscreen. For video fullscreen we dispatch: However, when using the new element fullscreen, you should now see webkitfullscreenchange, but not webkitpresentationmodechanged or webkitbeginfullscreenEvent |
An alternative may be to not use the player controls but instead use an overlay for controls which would allow you to detect the orientation. This will also allow further customization of the player for some use cases. |
@pelaxa overlays on the player is not allowed by youtube's ToS. The app will definitely not pass the android store review if detected. a more native web way would be the ideal solution (similar to chrome) however you can try your implementation on top of this pacakge and report if it works, as a proof of concept. (others might find it helpful incase they are not planning to put it on the play/app store) |
Thanks for pointing this out. I did find them here: https://developers.google.com/youtube/terms/required-minimum-functionality#overlays-and-frames |
On android a simple☹️
fullscreenchange
event listener on document detects fullscreen. wkwebview on ios does not play by the rules hereIt seems like
webkitfullscreenchange
event does not fire when attached todocument
. It only works if you attach it to the<video />
tag. This<video />
tag unfortunately lives inside the iframe and any attempts to access it will throw a CORS error.tracking branch if you want to contribute - https://github.com/LonelyCpp/react-native-youtube-iframe/tree/fs-callback
The text was updated successfully, but these errors were encountered: