laraveltwilio-video

Detecting the Dominant Speaker | Twilio In Laravel


How can i indicate audio in laravel project .Can anyone explane me how work Dominant Speaker in twilo and implenent laravel quick.js


Solution

  • In Twilio Video, when you connect to the room, one of the connect options is dominantSpeaker. If you set it to true your room will fire dominantSpeakerChanged events when the dominant speaker changes.

    Video.connect(token, {
      dominantSpeaker: true
    }).then(function(room) {
      room.on('dominantSpeakerChanged', participant => {
        console.log('The new dominant speaker in the Room is:', participant);
      });
    });
    

    You can read more about detecting the dominant speaker in the documentation.