Notification after playing video in mobile safari

I am trying to play some videos in UIWebView and to get feedback when the video is finished, without any user interaction. I am looking for something similar to MPMoviePlayerPlaybackDidFinishNotification , but in a UIWebView . Appreciate if someone can share their work.

0
source share
1 answer

I cannot vouch for all types of videos, but when I play a YouTube video in UIWebView format, I can capture an event when the user clicks β€œFinish”, subscribing to the type of private notification:

[[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(moviePlayerDidExitFullscreen:) name:@"UIMoviePlayerControllerDidExitFullscreenNotification" object:nil];

This works in iOS 4.3 and 5.0.

+1
source

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


All Articles