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

iframe AbortError on iOS when calling play() on background videos #814

Open
ndimatteo opened this issue Mar 21, 2022 · 3 comments
Open

iframe AbortError on iOS when calling play() on background videos #814

ndimatteo opened this issue Mar 21, 2022 · 3 comments

Comments

@ndimatteo
Copy link

Expected Behavior

In a React environment, autoplaying and pausing iframe background videos (Plus account) when in view using the play() and pause() methods.

Actual Behavior

On iOS (Safari and Chrome) the videos sporadically do not play when calling the play() method. Instead, it catches and throws the following error:

AbortError: The operation was aborted

The video is on a Plus account, it has no audio track, and it has the background=1 query param. Also tested with adding muted=1 and autoplay=1 for safe measure but it still catches with the above error intermittently.

Steps to Reproduce

You can see this in action here when loading up on iOS using Safari or Chrome (try refreshing a few times): https://www.cotenyc.com
* close the pop-up and observe the video background at the top of the page

Here is the associated component that holds the functionality for this iframe: https://gist.github.com/ndimatteo/6c6df45bfc262eb4719f74c407487b6d
* Line 19 is the function that calls play() and is referenced in the useEffect() once the API is initialized

I hope that helps, thanks so much! 🤘

@bdougherty
Copy link
Member

Looks like that page is no longer using the Vimeo Player. If you still have a way to set up a new example page, please re-open the issue and we can take a look.

@bdougherty bdougherty closed this as not planned Won't fix, can't repro, duplicate, stale Apr 3, 2024
@ndimatteo
Copy link
Author

@bdougherty the original page can still be found here: https://cote-nyc.vercel.app

I can't re-open the ticket, but pretty bummed that this went unanswered for over two years and ya'll just close it, even though I shared the code showing the complete setup 😞

I've since moved on to just using the file urls for Dash/HLS/MP4, but would still love to have the option to just use the iframe embed. Let me know what you think!

@bdougherty bdougherty reopened this Apr 4, 2024
@bdougherty
Copy link
Member

Sorry! I'm just trying to clean up the repo after having been mostly neglected for a while. Most things aren't valid anymore and unfortunately I don't have the time to give everything a full examination. I know it's not the greatest situation, but I hope you can understand.

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

No branches or pull requests

2 participants