Quantcast
Channel: Recent Threads — Xamarin Community Forums
Viewing all articles
Browse latest Browse all 204402

how to handle AVPlayerItemDidPlayToEndTimeNotification for avplayer

$
0
0

i wan to handle AVPlayerItemDidPlayToEndTimeNotification for AVPlayer in ios using Xamarin. i want to do something like this( pls see below code which is in objective C) . how to do this in xamarin.

[[NSNotificationCenter defaultCenter] addObserver:self
                                           selector:@selector(playerItemDidReachEnd)
                                               name:AVPlayerItemDidPlayToEndTimeNotification
                                             object:nil];
// 'Next add a method in your class –

-(void)playerItemDidReachEnd {
  //add the next song to your queue and play , just as you did in the method for selecting a cell.
}

Viewing all articles
Browse latest Browse all 204402

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>