Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- [[NSNotificationCenter defaultCenter] addObserver:self
- selector:@selector(playingItemDidEnd:)
- name:AVPlayerItemDidPlayToEndTimeNotification
- object:iPodPlayer];
- [[NSNotificationCenter defaultCenter] addObserver:self
- selector:@selector(playingItemDidEnd:)
- name:AVPlayerItemDidPlayToEndTimeNotification
- object:applicationPlayer ];
- - (void)playingItemDidEnd:(NSNotification *)notification
- {
- id object= [notification object];
- if(object==ipodPlayer)
- {
- printf("n Notification from iPod Player ");
- }
- else if(object==applicationPlayer)
- {
- printf("n Notification from application Player ");
- }
- [[NSNotificationCenter defaultCenter] addObserver:self
- selector:@selector(playingItemDidEnd:)
- name:AVPlayerItemDidPlayToEndTimeNotification
- object:[applicationPlayer currentItem] ];
- [[NSNotificationCenter defaultCenter] addObserver:self
- selector:@selector(playingItemDidEnd:)
- name:AVPlayerItemDidPlayToEndTimeNotification
- object:[iPodPlayer currentItem]];
- - (void)playingItemDidEnd:(NSNotification *)notification
- AVPlayerItem* object= [notification object];
- if(object==[applicationPlayer currentItem])
- {
- }
- else if(object==[avPlayer currentItem])
- {
- }
Add Comment
Please, Sign In to add comment