twilio / twilio-video-app-react

A collaboration application built with the twilio-video.js SDK and React.js
Apache License 2.0
1.8k stars 725 forks source link

Second participant audio is not playing on first participant screen #799

Closed IamSanjayGupta closed 1 year ago

IamSanjayGupta commented 1 year ago

I have 2 app twilio video app.

  1. User side : created in Svelte
  2. Agent side : created in react

In my case agent always join the call first then user join the call. But now if user unmute him/her self my agent can't hear the audio of user. I can see audio element is getting attached to DOM and user mute icon got removed but no audio can be hear at agent side. But once user joined and if agent unmute him/her self it user can hear the audio and now if user unmute him/her self agent can also hear user voice.

I also tested the same scenario by letting visitor join the first and i observed that second participant audio is not getting rendered until first participant unmute him/herself first.

Requesting for help as i am stuck in this issue since weak. An help will be much appreciated.

IamSanjayGupta commented 1 year ago

Second participant audio/video is not playing on first participant device.

condition: audio and video are set to off on joining room and join the room automatically when page load. if second participant unmute him/her self first then first participant can't listen the voice or see video.

we are facing this problem on project and but can share the project repo link, but I have created another codesandbox to demonstrate the same problem.

codesandbox link https://codesandbox.io/s/sharp-ben-jvztxi

join the room by passing the token(get the same from twilio cli) in url.

ex https://jvztxi.csb.app?t=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCIsImN0eSI6InR3aWxpby1mcGE7dj0xIn0.eyJqdGkiOiJTSzc2NzAzNWIxNTUwYjM1NGZkMThhOTAxNjJiOTQxZjE1LTE2ODM3ODg3NjIiLCJncmFudHMiOnsiaWRlbnRpdHkiOiJzYW5qYXkiLCJ2aWRlbyI6e319LCJpYXQiOjE2ODM3ODg3NjIsImV4cCI6MTY4Mzc5MjM2MiwiaXNzIjoiU0s3NjcwMzViMTU1MGIzNTRmZDE4YTkwMTYyYjk0MWYxNSIsInN1YiI6IkFDNDM5MjJhNmRiZWYyMWYzMjJjZTEyZDM5ZDcxZmFlOWMifQ.MmUUi4Wz_yM08bsqOQb4CSQqEa6Lxx2RcM0nk6xw5d1

Requesting for help.

stackoverflow link https://stackoverflow.com/questions/76225960/second-participant-audio-is-not-playing-on-first-participant-device-when-automat

IamSanjayGupta commented 1 year ago

This was issue with browser media autoplay policy.