objective c - Monitoring End of an Item in AV Foundation Framework (Notification in wrong thread) -


when playing video avplayer(avqueueplayer) trying monitor when video(avplayeritem) done playing. tried add observer avplayeritemdidplaytoendtimenotification nsnotificationcenter. don't notification. documentation tells:

important: notification may posted on different thread 1 on observer registered.

i know notifications posted in same thread observer registered can fetched. how suposed solve this.

im registering observer om main thread since not posted notification guess because avplayeritem post notification in different thread.

the documentation warns me, can't find information of how handle this.

if posted notification in own code use performselectoronmainthread. it's not can modify avplayeritem class. nether see smart way of extending avplayeritem categories nor subclassing post notification in right thread.


Comments

Popular posts from this blog

php - What is the difference between $_SERVER['PATH_INFO'] and $_SERVER['ORIG_PATH_INFO']? -

fortran - Function return type mismatch -

queue - mq_receive: message too long -