ios - app freezes by using avplayer -


i have used avplayer streaming audio. makes app freeze after seconds.

 avplayer *player = [[avplayer alloc]initwithurl:[nsurl urlwithstring:[songsarray objectatindex:songnumber]]]; self.songplayer = player; [[nsnotificationcenter defaultcenter] addobserver:self                                          selector:@selector(playeritemdidreachend:)                                              name:avplayeritemdidplaytoendtimenotification                                            object:[songplayer currentitem]]; [self.songplayer addobserver:self forkeypath:@"status" options:nskeyvalueobservingoptionnew context:nil]; [self.songplayer play]; 

i npt getting proper way streaming audio. if has idea please me out.

thanks all.


Comments

Popular posts from this blog

image - ClassNotFoundException when add a prebuilt apk into system.img in android -

I need to import mysql 5.1 to 5.5? -

Java, Hibernate, MySQL - store UTC date-time -