gilesvangruisen / Swift-YouTube-Player

Swift library for embedding and controlling YouTube videos in your iOS applications via WKWebView!
MIT License
875 stars 281 forks source link

Change to landscape only when full screen video #117

Open eyzuky opened 7 years ago

eyzuky commented 7 years ago

Hey, my app should only be portrait, but when I use the YouTubePlayerView I want the user to able to rotate the screen. Is there anyway to fix that ? it seems like a basic thing to be able to accomplish, but searching all over the net I could not find a solution. I am using iOS 10, Xcode 8.3, Swift 3.1

rmvz3 commented 7 years ago

Same here!

eyzuky commented 7 years ago

I have a great solution for this. Look at my answer in this SO question (last answer, user Eyzuky) http://stackoverflow.com/questions/36759996/play-video-fullscreen-in-landscape-mode-when-my-entire-application-is-in-lock-i/43233462#43233462

rmvz3 commented 7 years ago

It works like a charm. Thank you!