Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG]: iOS - AVPlayerItem Status Observer Not Triggering on iOS so not seeing continuous throbber and black screen #4433

Open
venBharathManjunath opened this issue Feb 27, 2025 · 3 comments
Labels

Comments

@venBharathManjunath
Copy link

Version

6.4.5

What platforms are you having the problem on?

iOS

System Version

18

On what device are you experiencing the issue?

Real device

Architecture

Old architecture

What happened?

When repeatedly changing the source (approximately 10 times) rapidly, the video enters a hanging state with a continuous loading throbber and a black screen. During this state, neither the onBuffer nor the onLoad callbacks are triggered.

Key Observations:

Working Scenario:

onVideoLoadStart is triggered as expected.

handlePlayerItemStatusChange is called through the observer _playerItemStatusObserver, resulting in the handleReadyToPlay function being executed.

onVideoLoad callback is successfully received.

Failure Scenario:

onVideoLoadStart is triggered, indicating the asset preparation is complete.

Logs confirm all observers are added, including _playerItemStatusObserver.

However, handlePlayerItemStatusChange is never called, causing handleReadyToPlay to not execute and preventing onVideoLoad from being triggered.

Code Segment:

_playerItemStatusObserver = playerItem.observe(.status, options: [.new, .old], changeHandler: _handlers.handlePlayerItemStatusChange)

Logs:

RCTVideo addPlayerItemObservers: Added status observer. Status: 0
RCTVideo addPlayerItemObservers: Added tracks observer.
[No further status updates logged]

Reproduction Link

repository link

Reproduction

Step to reproduce this bug are:

Have mutiple drm protected HLS stream in list and have preview player (not fullscreen) tap on the next video when the first video is in place. ( 10 times rapidly )

Observe that the 11th video hangs with a loading spinner and a black screen.

Check logs for missing status change events (handlePlayerItemStatusChange not called) in RCTPlayerObserver file due to which we don't receive onVideoLoad.

@venBharathManjunath venBharathManjunath changed the title [BUG]: iOS - AVPlayerItem Status Observer Not Triggering on iOS so seeing continuous throbber and black screen [BUG]: iOS - AVPlayerItem Status Observer Not Triggering on iOS so not seeing continuous throbber and black screen Feb 27, 2025
Copy link

github-actions bot commented Feb 27, 2025

Previous bot comment (click to expand)

Thank you for your issue report. Please note that the following information is missing or incomplete:

  • reproduction link

Please update your issue with this information to help us address it more effectively.

Note: issues without complete information have a lower priority

There is a newer version of the library available. You are using version 6.4.5, while the latest stable version is 6.10.2. Please update to the latest version and check if the issue still exists.

Note: If the issue still exists, please update the issue report with the latest information.

Copy link

Thank you for your issue report. Please note that the following information is missing or incomplete:

  • reproduction link

Please update your issue with this information to help us address it more effectively.

Note: issues without complete information have a lower priority

There is a newer version of the library available. You are using version 6.4.5, while the latest stable version is 6.10.2. Please update to the latest version and check if the issue still exists.

Note: If the issue still exists, please update the issue report with the latest information.

@venBharathManjunath
Copy link
Author

Hi @freeboub

I have checked the latest 6.10.2 version as well, I still face this issue. Could you please suggest some workaround to fix this issue or help me to debug further to share some relevant details.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Status: To Triage
Development

No branches or pull requests

1 participant