0

I use AVPlayer by default, not custom control.

AVPlayer *player = [AVPlayer playerWithURL:[NSURL URLWithString:@"https://clips.vorwaerts-gmbh.de/big_buck_bunny.mp4"]];
AVPlayerViewController *avPlayerVC = [[AVPlayerViewController alloc] init];
avPlayerVC.player = player;
avPlayerVC.view.translatesAutoresizingMaskIntoConstraints = NO;
[self addChildViewController:avPlayerVC];
[self.view addSubview:avPlayerVC.view];
[player play];
... (auto layout here)

AVPlayer works normally but I can't handle any event from it.

When a user clicks on the previous or next button, I want to be able to detect or receive events to update other URLs. When I try it myself, it does not work.

I tried to use AVQueuePlayer with 3 URLs, but the video only changes the URL when it finishes the current item, the 2 buttons next/previous doesn't work.

I want to receive event on control avplayer, How do I do this? Thank so much! Sorry for my bad English.

rken2
  • 17
  • 2
Th3M4sk
  • 21
  • 5
  • http://stackoverflow.com/a/37572692/2301271 I think this is the same issue you will encounter – Joshua Dec 27 '16 at 09:49
  • Thank you. I research and search many information about AVPlayer. I think I must create overlay toolbar, can't receive event from previous/next buttons – Th3M4sk Dec 28 '16 at 02:16

0 Answers0