开发者

UIActivity Indicator with mediaplayer framework

i am playing video from URL, i need to display the activity indicator while my movie is loading and if also was buffering at any time.开发者_如何转开发


Assuming that you're using MPMoviePlayerController, you can register for MPMoviePlayerLoadStateDidChangeNotification and react to changes in the loadState property.

Specifically, you'll want to display the activity indicator until the loadState changes to MPMovieLoadStatePlayable, and then display it again if it changes to MPMovieLoadStateStalled, and turn it off once more when the state is MPMovieLoadStatePlayable or MPMovieLoadStatePlaythroughOK.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜