如何知道MPMoviePlayerController正在Iphone OS 3.0中播放 [英] how to know that MPMoviePlayerController is playing in Iphone OS 3.0
问题描述
我需要知道MPMoviePlayerController是否在特定时刻播放.
I need to know if at an specific moment the MPMoviePlayerController is playing.
在iphone 3.0中,它不会触发MPMoviePlayerContentPreloadDidFinishNotification.
In iphone 3.0 it is not firing the MPMoviePlayerContentPreloadDidFinishNotification.
有人知道任何解决方案吗?
Does anyone knows any solution?
提前谢谢!
推荐答案
相同的问题(但没有答案)此处)
Same question (but no answer) here and several other reports can be found on other sites (e.g. here)
不太理想,但以3.1为目标似乎可以解决问题.
Not ideal, but it seems targeting 3.1 solves the problem.
一种解决方法是,在调用play
之前,将MPMoviePlayerController
属性scalingMode
设置为默认MPMovieScalingModeAspectFit
以外的其他值(例如,MPMovieScalingModeNone
并确保您的视频尺寸正确),然后挂接
A workaround maybe to set the MPMoviePlayerController
property scalingMode
to something other than the default MPMovieScalingModeAspectFit
( e.g. MPMovieScalingModeNone
and make sure your video is correct size) before calling play
and then hook the MPMoviePlayerScalingModeDidChangeNotification
event instead. it seems to get called (more than once!) as soon as the movie starts playing. Of course it will also be called if the user changes the scaling mode manually, so code for this. It's dirty but may help you?
这篇关于如何知道MPMoviePlayerController正在Iphone OS 3.0中播放的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!