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

Recent issue with Safari : running an audio without an user action #2410

Closed
theomathieubhvr opened this Issue Sep 26, 2017 · 6 comments

Comments

Projects
None yet
2 participants
@theomathieubhvr
Copy link
Contributor

theomathieubhvr commented Sep 26, 2017

Hi,

Since recently, when I try to run an audio element without and user action (after an HTTP call, for example), Safari fails (the audio does not run) and shows this error :

Unhandled Promise Rejection: NotAllowedError (DOM Exception 35): The request is not allowed by the user agent or the platform in the current context, possibly because the user denied permission.

screen shot 2017-09-26 at 9 12 25 am

Unhandled Promise Rejection: NotAllowedError (DOM Exception 35): The request is not allowed by the user agent or the platform in the current context, possibly because the user denied permission.

Safari version : 11
MacOS: High Sierra
Mediaelement: 4.2.6

PS : I know this was also the case on MacOS previous version (Sierra) but I can't check the previous Safari version too.

Thanks !

@theomathieubhvr theomathieubhvr changed the title Recent issue with Safari : running an audio without a click Recent issue with Safari : running an audio without an user action Sep 26, 2017

@rafa8626

This comment has been minimized.

Copy link
Contributor

rafa8626 commented Sep 26, 2017

Can you provide a Fiddle where I can see this issue please?

@theomathieubhvr

This comment has been minimized.

Copy link
Contributor Author

theomathieubhvr commented Sep 27, 2017

It's not mine but this one shows the issue.

https://jsfiddle.net/outaTiME/m0fj0dLz/

After more research I still don't think this is an issue on your side, but something that safari (and chrome in january 2018) requires now.

So maybe you only need to add a disclaimer on your README ;)

@theomathieubhvr

This comment has been minimized.

Copy link
Contributor Author

theomathieubhvr commented Sep 27, 2017

https://www.macworld.com/article/3206724/websites/how-to-stop-autoplay-videos-in-safari-11.html

Following this link you could be able to make fiddle.js autoplay its videos.

@rafa8626

This comment has been minimized.

Copy link
Contributor

rafa8626 commented Sep 27, 2017

So if this is not on the player, can you create a PR to state this on the README please, and I'll review it?

@rafa8626

This comment has been minimized.

Copy link
Contributor

rafa8626 commented Sep 29, 2017

Done. Note added on README. Thanks for pointing this and please star the project to support it

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.