#i124875# use AVAsset's best guess duration if AVPlayerItem isn't ready yet
in AV Foundation the most accurate media asset duration is available when the AVPlayerItem's status changes to AVPlayerItemStatusReadyToPlay. There already is an observer for this, but the upper layers expect getDuration() to be synchronous and to return within a reasonable time. Since returning an approximation is sufficient using the AVAsset's duration as fallback is fine.
Showing
Please
register
or
sign in
to comment