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

Fix race condition leading to a JS error instead of a NO_PLAYABLE_REPRESENTATION #1201

Merged
merged 1 commit into from
Jan 17, 2023

Conversation

peaBerberian
Copy link
Collaborator

A NO_PLAYABLE_REPRESENTATION error is what happen if fallbacks are enabled for encrypted contents but all qualities have been fallbacked from.

We had a race conditions if that situation arised before setting the corresponding track (I'm not too sure when this does happen but it did) where a random JS error (along the lines of "cannot read the property bitrate of undefined") i would be sent as an error nstead of the expected NO_PLAYABLE_REPRESENTATION error.

This race condition was linked to our handling of RxJS, so I'm unsure if it's still reproducible on our current dev branch (as we've removed RxJS from the source code since then). Still, I added in this PR supplementary checks and resilience code that would handle this situation should it ever happen again.

I chose to write the fix on top of the next branch, instead of the more usual fix on top of the master branch, because the corresponding code has completely been refactored since, and there's a higher chance of us releasing a 3.30.0 than a 3.29.1 release, that issue being relatively rare to reproduce.

If we ever should release a v3.29.1 instead, I will backport that fix.

@peaBerberian peaBerberian added bug This is an RxPlayer issue (unexpected result when comparing to the API) DRM Relative to DRM (EncryptedMediaExtensions) Priority: 0 (Very high) This issue or PR has a very high priority. Efforts should be concentrated on it first. labels Jan 17, 2023
@peaBerberian peaBerberian added this to the 3.30.0 milestone Jan 17, 2023
@peaBerberian peaBerberian merged commit 8a8e4c8 into next Jan 17, 2023
peaBerberian added a commit that referenced this pull request Jan 31, 2023
…esentations2

Fix race condition leading to a JS error instead of a NO_PLAYABLE_REPRESENTATION
peaBerberian added a commit that referenced this pull request Feb 8, 2023
…esentations2

Fix race condition leading to a JS error instead of a NO_PLAYABLE_REPRESENTATION
peaBerberian added a commit that referenced this pull request Feb 9, 2023
…esentations2

Fix race condition leading to a JS error instead of a NO_PLAYABLE_REPRESENTATION
@peaBerberian peaBerberian mentioned this pull request Feb 21, 2023
@peaBerberian peaBerberian mentioned this pull request Jun 13, 2023
@peaBerberian peaBerberian deleted the fix/race-condition-empty-representations2 branch July 6, 2023 12:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug This is an RxPlayer issue (unexpected result when comparing to the API) DRM Relative to DRM (EncryptedMediaExtensions) Priority: 0 (Very high) This issue or PR has a very high priority. Efforts should be concentrated on it first.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant