Open staroflead opened 5 years ago
YouTubeStandaloneAndroid present portrait video as with landscape. How can it play vertical fullscreen?? iOS works well
I got portrait fullscreen with this solution - https://medium.com/@mridx/youtubestandaloneandroid-play-youtube-videos-in-portrait-mode-in-android-react-native-hack-edd0fdce6088 But I can't go back to portrait after toggling landscape
@kofsiwon thanks for the solution. It works!
My app is portrait locked and I implemented YouTubeStandaloneAndroid for my button. The Library works fine with lightboxMode. I can change device's orientation to landscape for full screen player. However it's unlocked my app's orientation lock on componentDidMount. I have tried to lock orientation again when player exited, but it's not work.
"react-native": "0.51.0" "react-native-youtube": "^1.1.0" "react-native-orientation": "^3.1.0",
Edit: I tried to disable
lightboxMode
, tried to play a video without tilting device (keep in portrait mode), then close the video. Then app rotated twice, first to landscape, then back to portrait. I also tried not to callOrientation.lockToPotrait()
after player exited. App still rotated twice by itself, then it wouldn't rotate anymore even if i switch device's orientation by hand.