Design:
ViewController: looks like a player and a container screw.
Player View: downloads AVPlayer and has a sub-view (PlayerControlView) at the bottom of the player screen for loading player controls (play / pause / progress bar / fullscreen, etc.)
PlayerControlView: A custom UIView that has player controls.
I can load the AVPlayer and player controls in normal mode (i.e. not in full screen mode). Playback is OK and all controls work.
Problem:
I want AVPlayer to go full screen when the user clicks the full screen icon on the player controls. I can make AVPlayer in full screen by changing the frame of the Player view and setting the Zposition for AVPlayerLayer to 100.
The problem is that AVPlayer remains in full-screen mode only if I do not make any updates to playerControlView (for example, progress bar / click of the play button, etc.). Like sson, as an update of the playback progress is performed on the slider, AVPlayer exits full-screen mode and appears to return to normal mode.
Player controls do not move at the bottom of the player view. Your remy in his previous position. In normal mode, the correct player control setting when changing orientation.
Can someone please let me know if the approach I took is the right way? If not, suggest a suitable design for implementing fully functional player controls for AVPlayer.
Thansk in advance, Naveen
source share