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

Play.html always starts mute #2481

Closed
dapollon83 opened this issue Sep 9, 2020 · 2 comments
Closed

Play.html always starts mute #2481

dapollon83 opened this issue Sep 9, 2020 · 2 comments
Assignees

Comments

@dapollon83
Copy link

Hello,

we are make some test with ant media server.
We are streaming through web page http://10.0.0.139:5080/webRTCApp and that's ok.
Then we are trying to see the stream using play.html and url similar to http://10.0.0.139:5080/WebRTCAppEE/play.html?name=474803532157798475329857
Everything works smooth but audio is always mute when play starts and we have to switch on it manually.
Is there any way like a switch or something else to have the audio mute disabled when autoplay starts?

Thanks

@eneskuluk
Copy link

This is a default behaviour of the browser. If autoplay is enabled, audio is muted.
This is a caution that has been taken in the browsers in order to prevent any malicious behaviour when you enter the website.
As a summary, this is not a result of our implementation. As a result of browser's policy.
Regards.

@mekya
Copy link
Contributor

mekya commented Sep 24, 2020

Just let me add somethings.

You can make it unmuted by changing this file
https://github.com/ant-media/StreamApp/blob/master/src/main/webapp/play.html#L50

Basically this file resides in /usr/local/antmedia/webapps/WebRTCAppEE/play.html

As @eneskuluk mentions, this is about chrome policy. It may not start autoplay in some cases if video has audio.
You may need to manual interaction to play the whole video.

For further information, take a look at this blog post
https://developers.google.com/web/updates/2017/09/autoplay-policy-changes

@mekya mekya closed this as completed Mar 3, 2021
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