webex / webex-js-sdk

JavaScript SDK for Webex
https://webex.github.io/webex-js-sdk/
Other
169 stars 336 forks source link

Webex Meeting - remote audio is silent when remote media is automatically added #3588

Closed JiandongRuan closed 2 months ago

JiandongRuan commented 2 months ago

Describe the bug Remote audio isn't rendered.

To Reproduce Steps to reproduce the behavior:

  1. Modify the kitchen app so that it automatically join a meeting and add the remote media. The automation does the following 4 operations programmatically without requiring users clicking the button on the UI: createMeeting(); verifyPassword(); joinMeeting(); addMedia();
  2. Speak at the remote side after the app joins the meeting. The remote audio isn't played back in the kitchen app.

Expected behavior Remote audio should be played.

Additional context Attached browser_bot.tar.gz is the version which I modified from the kitchen app. Use the following query parameters to pass the meeting information.

?videoAddress=${MEETING_NUMBER}@webex.com&accessToken=${REPLACE_WITH_YOUR_ACCESS_TOKEN}&password=${MEETING_PASSWORD}

sandiban commented 2 months ago

Hello @JiandongRuan, Thanks for your patience so far and thanks for sharing the details! Just to correct, this is not the "Kitchen App", we call it just "Browser SDK test plugin". We call KitchenSink (KS) App for the iOS and Android Mobile test Apps. But I understand what you tried to mean here, I just mentioned it additionally. :)

So, before directly getting into your modified script, we have couple of queries -

I've a strong doubt that possibly the remote media is not connected with the meeting. Because I don't know how you implemented it as Remote Media would be automatically connected, but as per the JS SDK workflow - first the media available devices need to be fetched (or, GET) and then those need to be added with the meeting. Once you share us the complete Browser log .HAR file, this part would be cleared.

Regards! Sandip

JiandongRuan commented 2 months ago

Hello @sandiban it turned out to be the audio autoplay policy in Chrome browser, discussed here https://developer.chrome.com/blog/autoplay/. My issue was fixed by starting chrome browser with --autoplay-policy=no-user-gesture-required command line option.

sandiban commented 2 months ago

Thanks for the confirmation @JiandongRuan !

Regards! Sandip