i'm using AVPlayer in my apps instead MPMoviePlayerController since i want to put the player as sublayer. However i need control like play, pause, search, and full screen. How do i get that button in AVPlayer? This is how i put the player:
AVURLAsset *avasset = [[AVURLAsset alloc] initWithURL:URL1 options:nil];
AVPlayerItem *item = [[AVPlayerItem alloc] initWithAsset:avasset];
player = [[[AVPlayer alloc] initWithPlayerItem:item]retain];
playerLayer = [AVPlayerLayer playerLayerWithPlayer:player];
CGSize size = self.view.bounds.size;
float x = size.width/2.0-187.0;
float y = size.height/2.0 - 125.0;
playerLayer.frame = CGRectMake(x, y, 474, 320);
[playerLayer setVideoGravity:AVLayerVideoGravityResizeAspectFill];
[self.view.layer addSublayer:playerLayer];
[player play];