开发者

Notification after Video playback in mobile safari

开发者 https://www.devze.com 2023-01-22 00:27 出处:网络
I am trying to play some videos in a UI开发者_开发技巧WebView and required to get some feedback when the video playback is finished, without any user interaction. I am looking for something similar to

I am trying to play some videos in a UI开发者_开发技巧WebView and required to get some feedback when the video playback is finished, without any user interaction. I am looking for something similar to MPMoviePlayerPlaybackDidFinishNotification, but in UIWebView. Appreciate if anyone can share a work around.


I can't vouch for all video types but when I play a YouTube video in a UIWebView I can capture the event when the user presses 'Done' by subscribing to a private notification type:

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

This works in iOS 4.3 and 5.0.

0

精彩评论

暂无评论...
验证码 换一张
取 消