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

Safari autoplay issue #12

Closed
jacklinwood opened this issue Mar 17, 2020 · 8 comments
Closed

Safari autoplay issue #12

jacklinwood opened this issue Mar 17, 2020 · 8 comments

Comments

@jacklinwood
Copy link

Hi Blake,

I wrote on a closed issue so not sure whether you see those anymore so though I'd try my luck here. Original message below:

Great plugin BTW :)

I am aware of the autoplay issue in Safari if the video is not muted. The default option is for the video to be muted but when inspecting the element, I can see that muted is not being added therefore it isn't working in Safari.

Any ideas?

@blakewilson
Copy link
Owner

Hey @jacklinwood ,

Sorry, I meant to get back to you on the original issue! This past week has been very crazy.

You are right. There is something going on with Safari not adding the attributes correctly.

This issue is happening around here:
https://github.com/blakewilson/vidbg/blob/master/src/vidbg.js#L146

I'm hoping to get this resolved this weekend!

Blake

@jacklinwood
Copy link
Author

No need for an apology Blake. Just thought I'd try in case you hadn't seen it.

Great news on you hoping to get it sorted this weekend. Other than this small bug, it's the perfect plugin :)

Keep me posted!

Jack

@third-hyperion91
Copy link

Hi Blake! Great plugin, did you manage to sort the IOS safari issue? Thank you.

@blakewilson
Copy link
Owner

Hey all,

Sorry I'm late to get back on this.

I've found that in Safari, the autoplay attribute was interfering with the play promise that is used to autoplay video. Now, the plugin relies on the play promise (or lack thereof depending on the browser) to autoplay the video. There will be no side effects or visual changes with this approach, just a modification under the hood.

I've published a branch with this fix. Would you mind checking it out to make sure it resolves the problem you're facing before I merge into master?

Here's the branch:
https://github.com/blakewilson/vidbg/tree/safari-playback-fix

@third-hyperion91
Copy link

third-hyperion91 commented Apr 5, 2020 via email

@jacklinwood
Copy link
Author

Worked for me Blake!

Thanks a lot!

@blakewilson
Copy link
Owner

@jacklinwood great! I'll get it merged into master.

@blakewilson
Copy link
Owner

Here is the new version (2.0.1) with the Safari fix.

https://github.com/blakewilson/vidbg/releases/tag/v2.0.1

Take care!

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

3 participants