我玩實況電視流中的iOS應用,我發展。我正在使用MPMoviePlayerController並需要創建自定義控件(播放,暫停,進度條等)。的MPMoviePlayerController:得到一個可靠的非跳過currentPlaybackTime
雖然試圖獲得currentPlaybackTime我注意到一些非常奇怪的行爲:它跳過周圍像有沒有明天。
持續時間屬性是在7170秒穩定的,它永遠不會改變。該playableDuration財產的增長,而在影片播放,並currentPlaybackTime不斷跳來跳去:
playableDuration: 7179.875398
currentPlaybackTime: 7170.181204
--------------
playableDuration: 7187.655396
currentPlaybackTime: 7171.079373
--------------
playableDuration: 7197.208128
currentPlaybackTime: 7172.131998
--------------
playableDuration: 7197.208128
currentPlaybackTime: 7173.139118
--------------
playableDuration: 7197.208128
currentPlaybackTime: 7174.139770
--------------
playableDuration: 7197.208128
currentPlaybackTime: 7175.139666
--------------
playableDuration: 7197.208128
currentPlaybackTime: 7176.140805
--------------
playableDuration: 7197.208128
currentPlaybackTime: 7177.139057
--------------
playableDuration: 7197.208128
currentPlaybackTime: 7178.139128
--------------
playableDuration: 7197.208128
currentPlaybackTime: 7179.139911
--------------
playableDuration: 7199.822063
currentPlaybackTime: 7170.095921
--------------
playableDuration: 7209.959997
currentPlaybackTime: 7171.140078
--------------
playableDuration: 7209.959997
currentPlaybackTime: 7172.140715
--------------
playableDuration: 7209.959997
currentPlaybackTime: 7173.076899
--------------
playableDuration: 7209.959997
currentPlaybackTime: 7174.139497
--------------
playableDuration: 7209.959997
currentPlaybackTime: 7175.139907
--------------
playableDuration: 7209.959997
currentPlaybackTime: 7176.138233
--------------
playableDuration: 7209.959997
currentPlaybackTime: 7177.139523
--------------
playableDuration: 7209.959997
currentPlaybackTime: 7178.135736
--------------
playableDuration: 7209.959997
currentPlaybackTime: 7179.138545
--------------
playableDuration: 7209.959997
currentPlaybackTime: 7180.111102
--------------
playableDuration: 7219.939398
currentPlaybackTime: 7171.132859
--------------
playableDuration: 7219.939398
currentPlaybackTime: 7172.128591
--------------
playableDuration: 7219.939398
currentPlaybackTime: 7173.136137
--------------
playableDuration: 7219.939398
currentPlaybackTime: 7174.135416
--------------
playableDuration: 7219.939398
currentPlaybackTime: 7175.137593
--------------
playableDuration: 7219.939398
currentPlaybackTime: 7176.131573
--------------
playableDuration: 7219.939398
currentPlaybackTime: 7177.137812
--------------
playableDuration: 7219.939398
currentPlaybackTime: 7178.131751
--------------
playableDuration: 7219.939398
currentPlaybackTime: 7179.135922
--------------
playableDuration: 7219.939398
currentPlaybackTime: 7180.139828
--------------
playableDuration: 7229.752731
currentPlaybackTime: 7171.129731
--------------
playableDuration: 7229.752731
currentPlaybackTime: 7172.136576
--------------
playableDuration: 7229.752731
currentPlaybackTime: 7173.132362
--------------
playableDuration: 7229.752731
currentPlaybackTime: 7174.139998
正如你可以看到它跳從7179到7170,再從7180回到7171,一次又一次......在換句話說,似乎沒有辦法獲得一個穩定遞增的currentPlaybackTime。這導致我的進度條跳轉,並且進度標籤(0:04:30/2:00:00)也表現得非常奇怪。
有沒有人見過這種行爲?有沒有解決方法?
我實際上看到的與本地MPMoviePlayerViewController完全相同的行爲。經過的時間每10秒回跳一次。我猜測我無能爲力。 –
這聽起來像不正確的編碼數據 - 檢查你的電影流和它的編碼非常密切。 – Till
我有同樣的問題:我稱之爲「setCurrentPlaybackTime」然後我得到「currentPlaybackTime」爲我設置它,那麼它就跳回到以前的值。這是很煩人的行爲。蘋果沒有正確解決這個問題真是太神奇了。 – bashan