I have to play a series of videos in my app. I am using AVQueuePlayer to play the videos using the code:
AVQueuePlayer *queuePlayer = [[AVQueuePlayer alloc] initWithItems:items];
AVPlayerLayer *myPlayerLayer = [AVPlayerLayer playerLayerWithPlayer:queuePlayer];
myPlayerLayer.frame = CGRectMake(0, 0, 320, 350);
[self.view.layer addSublayer:myPlayerLayer];
[self.queuePlayer play];
I am facing two issues.
When the video plays, the frame of player is not according to the given values(i.e. 0, 0, 320, 350).
No control buttons(volume,play,stop, forward etc) are being showed as they are shown when we play video with MPMediaPlayer. Am i missing something for both cases? (I am using AVFoundation for the first time so these questions may seem stupid).
Thanks in advance.