lionheart / openradar-mirror

A mirror of radars pulled from http://openradar.me/.
246 stars 17 forks source link

39282364: AVPlayerItem loadedRangeTime and Player Item duration no not match when fully loaded. #19602

Open openradar-mirror opened 6 years ago

openradar-mirror commented 6 years ago

Description

Area: AVFoundation

Summary: There is a mismatch between player item duration and the full loaded time range of AVPlayerItem while streaming HLS and the network is poor. KVO-ing on duration clearly shows duration switching mid stream but the loaded time Range never satisfies that requirement. Due to this, isPlaybackBufferFull and isPlaybackLikelyToKeepUp and never flipped to true resulting in infinite stall.

Steps to Reproduce:

  1. Turn on NLC on iOS/mac OS.
  2. Setup KVO for AVPlayerItem duration, loadedTimeRange, isPlaybackBufferFull and isPlaybackLikelyToKeepUp
  3. Play the HLS Stream using AVPlayer.
  4. Observe how duration switches midway.

Expected Results: loadedTimeRanges should add up to the net duration of the item and there shouldn't be an infinite stall.

Actual Results: They don't match which results in player item trying to load forever.

Version/Build: iOS 11.3 / Xcode 9.3(9E145)

- Product Version: iOS 11.3/Xcode 9.3(9E145) Created: 2018-04-09T16:40:51.503080 Originated: 2018-04-09T00:00:00 Open Radar Link: http://www.openradar.me/39282364

shubhamk840 commented 4 months ago

Hi , any solution to this ?