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

Player stuck at state src-equals when loading mp3 in bad network condition, and won't be able to execute unload #6664

Closed
xilin opened this issue May 23, 2024 · 0 comments · Fixed by #6676
Assignees
Labels
priority: P2 Smaller impact or easy workaround type: bug Something isn't working correctly
Milestone

Comments

@xilin
Copy link

xilin commented May 23, 2024

Have you read the FAQ and checked for duplicate open issues?
Yes.

If the problem is related to FairPlay, have you read the tutorial?

Not related to FairPlay.

What version of Shaka Player are you using?

4.8.5

Can you reproduce the issue with our latest release version?
Yes

Can you reproduce the issue with the latest code from main?
Yes

Are you using the demo app or your own custom app?
My own custom app

If custom app, can you reproduce the issue using our demo app?
Haven't been able to run the demo app yet.

What browser and OS are you using?
MacOS Sonoma 14.4.1 Google Chrome

For embedded devices (smart TVs, etc.), what model and firmware version are you using?
N/A

What are the manifest and license server URIs?

Not able to share

What configuration are you using? What is the output of player.getConfiguration()?

default

What did you do?

  • Call player.load(url, 0) with url to be like https://www.xyz.com/test.mp3
  • In a super bad network condition with high latency and slow speed
  • Wait about 2 mins, player stuck at src-equals state and cannot execute unload command

What did you expect to happen?

  • Player should be able to execute unload or reset state automatically when timeout like 30s

What actually happened?

Here is the log we got in test:

# called load
2024-05-15_22:51:37.55051-0700 Event: loading {"timeStamp":1388674.5,"type":"loading","g":false}"
2024-05-15_22:51:37.55125-0700 playback state changed: src-equals"
2024-05-15_22:51:37.55131-0700 Event: buffering {"buffering":true,"timeStamp":1388675.5,"type":"buffering","g":false}"
2024-05-15_22:51:37.55205-0700 Event: streaming {"timeStamp":1388676,"type":"streaming","g":false}"

# HTML media element loadstart event
2024-05-15_22:51:37.55399-0700 Event: loadstart {"isTrusted":true,"type":"loadstart"}"

2024-05-15_22:51:40.78014-0700 playback stalled {"isTrusted":true,"type":"stalled"}"

# called unload
2024-05-15_22:52:29.87311-0700 Starting unload

# checked state, still `src-equals`
2024-05-15_22:53:23.85132-0700 playbackState:src-equals

It seems player runs srcEqualsInner_, but this promise just neither resolved or rejected, so the mutex lock was always hold by srcEqualsInner_ https://github.com/shaka-project/shaka-player/blob/v4.8.5/lib/player.js#L1531 , and when unload or new load is called, none of them can get the lock to move on.

Are you planning send a PR to fix it?
Not yet, seek for help to see if there is a good way to fix it

@xilin xilin added the type: bug Something isn't working correctly label May 23, 2024
@xilin xilin changed the title Player stuck at state src-equals when loading mp3 in bad network condition, and won't be able to response to unload May 23, 2024
@shaka-bot shaka-bot added this to the v4.9 milestone May 23, 2024
@avelad avelad added the priority: P2 Smaller impact or easy workaround label May 27, 2024
@avelad avelad self-assigned this May 27, 2024
avelad added a commit that referenced this issue May 28, 2024
avelad added a commit that referenced this issue May 28, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
priority: P2 Smaller impact or easy workaround type: bug Something isn't working correctly
3 participants