Videoroom remote stream autoplay with audio without publishing own stream

124 views
Skip to first unread message

Shantanu Dhanuka

unread,
Apr 28, 2020, 7:33:44 PM4/28/20
to meetecho-janus
Dear All

I am using videoroom plugin for a use case which requires one user to be the presenter and rest users to be passive listeners.So, in this case for the listeners, I do not want to publish listener's feed. The problem is if I comment the publishownfeed function (as in the demo, responsible for publishing own feed), the remote video does not autoplay. The only way for it to autoplay is if I start the video muted. Google's following policy seems to be behind this : https://developers.google.com/web/updates/2017/09/autoplay-policy-changes

What intrigues me is, why is the above policy overridden if I listener feed is published. Is there a way in which I can let the listner autoply audio and video both without publishing his own feed ?

Roy Chan

unread,
Apr 28, 2020, 8:57:06 PM4/28/20
to meetecho-janus
That's poor browser behaviour that prevent you from autoplay a video with sound. The browser did that on purpose. If you published the video, some browser may think you intended more to watch video with sound so it auto play video with sound. but not all browsers did that as each have their own algorithm.

To fix that, You can take a look at a code snippet here:

basically you can catch the promise if it's not played successfully and show a popup to ask the user to click on a button that would play the video.

Adrien Floor

unread,
Jun 1, 2020, 5:29:01 PM6/1/20
to meetecho-janus
Hey @shantanu

Considering what you are doing, would you take a look at my post here ? I'm pretty sure you would have the answer : https://groups.google.com/forum/#!searchin/meetecho-janus/videoroom|sort:date/meetecho-janus/CRNCU0lWWEs/UbhNI3irAgAJ

Thanks a lot !!
Reply all
Reply to author
Forward
0 new messages