¡@

Home 

2014/10/15 ¤U¤È 10:11:09

iphone Programming Glossary: loadedtimeranges

How to get file size and current file size from NSURL for AVPlayer iOS4.0

http://stackoverflow.com/questions/3999228/how-to-get-file-size-and-current-file-size-from-nsurl-for-avplayer-ios4-0

from that URL Please help thanks iphone avfoundation share improve this question You need to start observing the loadedTimeRanges property of the current item like this AVPlayerItem playerItem self.player.currentItem playerItem addObserver self forKeyPath.. aContext playerItemTimeRangesObservationContext AVPlayerItem playerItem AVPlayerItem anObject NSArray times playerItem.loadedTimeRanges there is only ever one NSValue in the array NSValue value times objectAtIndex 0 CMTimeRange range value getValue range float..

Pre-buffering for AVQueuePlayer

http://stackoverflow.com/questions/4218090/pre-buffering-for-avqueueplayer

and it's AVPlayerItemStatusReadyToPlay value in particular might be related to buffering. However the AVPlayerItem's loadedTimeRanges property seems more related to buffering. Doing KVO on that array was a bit trickier the array object itself doesn't change.. to printing out it's content every second. What I found out is that a few seconds in the queue's first item the loadedTimeRanges for the second item shows up a new CMTimeRange with start time 0 and some small duration. The duration can increase up to..

AVPlayer streaming progress

http://stackoverflow.com/questions/7691854/avplayer-streaming-progress

this question I am just working on this and so far have the following NSTimeInterval availableDuration NSArray loadedTimeRanges self.player currentItem loadedTimeRanges CMTimeRange timeRange loadedTimeRanges objectAtIndex 0 CMTimeRangeValue float startSeconds.. this and so far have the following NSTimeInterval availableDuration NSArray loadedTimeRanges self.player currentItem loadedTimeRanges CMTimeRange timeRange loadedTimeRanges objectAtIndex 0 CMTimeRangeValue float startSeconds CMTimeGetSeconds timeRange.start.. availableDuration NSArray loadedTimeRanges self.player currentItem loadedTimeRanges CMTimeRange timeRange loadedTimeRanges objectAtIndex 0 CMTimeRangeValue float startSeconds CMTimeGetSeconds timeRange.start float durationSeconds CMTimeGetSeconds..