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

PS5: wait for a readyState of 4 before considering the content loaded #1257

Merged
merged 2 commits into from
Jul 3, 2023

Conversation

peaBerberian
Copy link
Collaborator

We noticed that on a PlayStation 5, an HTMLMediaElement's readyState property can switch to 3 even if the content is encrypted and its decryption key hasn't be obtained yet.

This is unusual (we usually encounters a readyState of 1 in that case) and perhaps not compliant to the WHATWG HTML5 standard. More importantly, it might cause the RxPlayer to switch to the LOADED state too soon, before switching to a BUFFERING state until the key is obtained (whereas it is expected that the RxPlayer can play immediately after reaching the LOADED state).

Thankfully, a simple work-around can be applied on this case: we know that on the PlayStation 5, we'll always reach a readyState of 4 as soon as we can play the content.

We thus rely, only on the PlayStation 5 for now, on the readyState being set to 4 before announcing the content as LOADED.

@peaBerberian peaBerberian added this to the 3.31.1 milestone Jun 27, 2023
@peaBerberian peaBerberian merged commit e80e99a into master Jul 3, 2023
4 checks passed
@peaBerberian peaBerberian deleted the fix/ps5-loaded branch July 6, 2023 12:01
@peaBerberian peaBerberian modified the milestones: 3.31.1, 3.32.0 Sep 12, 2023
@peaBerberian peaBerberian mentioned this pull request Oct 2, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant