-
Notifications
You must be signed in to change notification settings - Fork 131
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
Infinity loading state on Safari Mobile when autoplay is false #1390
Comments
I checked on https://developers.canal-plus.com/rx-player/ ( |
It seems that Safari mobile here choose to not follow the A solution could be to add some exception (or detection?) when deciding whether to trigger the Interestingly, we already had a work-around just for Safari Mobile, but it seems that they changed something that made it not enough? We could just make it We could also do a hack like calling I can make a branch with the fix if you know how to test this. |
Maybe we also broke our already-existing work-around because the comment description of it make the exact same observation you had. So I'll also look at the history there. |
I think I get it, before the work-around was only necessary for when the media element has the attribute Though here, I guess you don't have |
… state Fixes #1390 We previously had a work-around specific to safari mobile when the media element had the `playsinline` attribute where the browser would never switch to the `LOADED` state if the media element was still in a `paused` state. From a recent issue (#1390), it seems to now even happen when `playsinline` is not set. We also add a check for whether the media element is `paused` (as if not paused, such as when autoplay was handled, there doesn't seem to be any issue). It shouldn't break the previous seen case if we are to believe the comment on top of the work-around.
… state Fixes #1390 We previously had a work-around specific to safari mobile when the media element had the `playsinline` attribute where the browser would never switch to the `LOADED` state if the media element was still in a `paused` state. From a recent issue (#1390), it seems to now even happen when `playsinline` is not set. We also add a check for whether the media element is `paused` (as if not paused, such as when autoplay was handled, there doesn't seem to be any issue). It shouldn't break the previous seen case if we are to believe the comment on top of the work-around.
Hello, thanks for answer. |
Hello @jakubjereczek, I reproduced the issue on the version 4.0.0, however I don't have the issue in the version 3.33.0 you mentionned. Can you confirm the version you had a bug with ? |
Locally on our application I reproduced on 3.33.0/2. But I just checked on https://developers.canal-plus.com/rx-player/ and only 4.0.0 has mentioned issue. I will try to check if any other initialization settings on our side affect this. |
I have made a PR that fixes the issue for version 4 (at least on the device I tested with). |
@Florent-Bouisset ok, that would be great |
After further investigation, I realized that the sequence of creating and disposing RxPlayer instance was wrong in our demo. Maybe your application is doing the same and you have two players using the same video element? const myVideo = document.querySelector("video")
new RxPlayer(videoElement)
const player = new Player({ videoElement: myVideo});
const player2 = new Player({ videoElement: myVideo}); // this throw an error "The video element is already attached to another RxPlayer instance." I created a branch based on v3.32.2 named Let me now if you observe any changes. If you have an error "The video element is already attached to another RxPlayer instance." , you may have to update you application code. |
(Sorry a PR merge closed this issue automatically when it shouldn't have, I re-opened it) |
I didn't have time to reply, but I'm back. I'll check everything right away. BTW: |
@Florent-Bouisset I used Logs:
I didn't receive the |
Hello, thanks for you feedback,
For the issue you had on iOS with autoplay |
Yes, we have |
Sorry for late response, I was quite busy. I checked your fix @Florent-Bouisset and now it works - it is possible to play with autoplay: false. |
Resolved |
For the "Pause TV" functionality, we set the autoplay property to false (
ILoadVideoOptions
).This causes RxPlayer to go into a perpetual loading/buffering state. The situation only applies to Safari Mobile.
(with autoplay: true it is ok.)
Device:
iPhone 11 Pro with iOS 17.1
I tested on RxPlayer 3.33.0 and 3.29.0
Logs:
The text was updated successfully, but these errors were encountered: