How to add another video to MPMoviePlayer?

Can I create a playlist for MPMoviePlayer? all videos from the Internet. While the player is running, when it comes to 1 minute, I want to play another video from the URL. the second video is an advertising clip. after the end of the clip, the main video should continue. Is it possible? I saw some ipad apps like hulu plus.

What steps should I take?

+3
source share
1 answer

You can use the playback notification:

    [[NSNotificationCenter defaultCenter] addObserver:self
                                         selector:@selector(moviePlayBackDidFinish:)
                                             name:MPMoviePlayerPlaybackDidFinishNotification
                                           object:nil];

And make your player select the next item in your playlist using this method.

    -(void)moviePlayBackDidFinish:(NSNotification*)notification;

URL- plist , .

+1

Source: https://habr.com/ru/post/1760049/


All Articles