2015-11-07 51 views
0

我在考慮爲玩家的當前時間使用KVO。但是當前時間是一種方法([myPlayer currentTime])而不是屬性,KVO會在這種情況下工作嗎?如果不是,我如何跟蹤視頻播放的進度併爲progressView設置一個浮點數?如何爲AVPlayer設置progressView?

回答

0

根據當前時間調用AVPlayer的addPeriodicTimeObserverForInterval:queue:usingBlock:以獲取定期回調。當前時間作爲參數傳遞給您的塊。

+0

謝謝馬特,好像我應該搜索官方文檔,然後再問另一個問題:) – WhiteTherewasproblem