Describe the bug
I add a mutistream bot is added to the meeting with several participants like this
const options: AddMediaOptions = {
localStreams: this.localStreams,
audioEnabled: true, // Enable audio streams
videoEnabled: true, // Enable video streams
remoteMediaManagerConfig: {
video: {
preferLiveVideo: true,
initialLayoutId: 'myLayoutId',
layouts: {
DualPanePingPong: myLayout,
},
},
audio: {
numOfActiveSpeakerStreams: 1, // Single slot: trust it contains audio for current active speaker
numOfScreenShareStreams: 1,
},
},
additionalMediaOptions: {
receiveVideo: true,
receiveAudio: true,
sendVideo: true,
sendAudio: false, // Bot is receive-only
},
};
await this.meeting!.addMedia(options)
I subscribe to sourceUpdate event for audio like this:
private setupMediaEvents(meeting: Meeting): void {
meeting.on('media:remoteAudio:created', (event: RemoteMediaGroup) => {
const audioSlots = event.getRemoteMedia('unpinned') || event.getRemoteMedia('all') || [];
audioSlots.forEach((slot: any, index: number) => {
slot.on('sourceUpdate', (ev: any) => {
this.log(`[AudioSlot ${index} sourceUpdate] state:${ev.state}, csi:${ev.csi}, memberId:${ev.memberId}`, 'info');
});
});
});
}
The thing is that sourceUpdate event can be received for video panes but it cannot be received for audio slots. As result of it, I cannot see how I can distinguish the moment some audio slot starts channeling audio for a different person.
I tried to use a workaround - create just a single audio slot and use media:activeSpeakerChanged to distinguish the moment active speaker changes. But it happened that media:activeSpeakerChanged might arrive significantly later that the only audio slot starts channeling audio for a different participant.
I tried to use a different workaround - pin audio slot to use with receiver-requested policy (like video slots allow to do) but is did not work and the audio slot was still used by webex-js-sdk with active-speaker policy.
Thus, could you please clarify if sourceUpdate works for audio slots and how it can be used?
To Reproduce
Steps to reproduce the behavior:
- Create a multistream bot
- Subscribe to
sourceUpdate event for audio slots
- Wait when several participants join the meeting and start talking
- Check if
sourceUpdate event handler for audio slot is called
Expected behavior
sourceUpdate event handler for audio slot is called
Actual behavior
sourceUpdate handler for audio slot is NOT called
Platform (please complete the following information):
- OS: MacOS
- Browser: chrome
- Version: 146.0.7680.178
- Device Type Desktop
Describe the bug
I add a mutistream bot is added to the meeting with several participants like this
I subscribe to
sourceUpdateevent for audio like this:The thing is that
sourceUpdateevent can be received for video panes but it cannot be received for audio slots. As result of it, I cannot see how I can distinguish the moment some audio slot starts channeling audio for a different person.I tried to use a workaround - create just a single audio slot and use
media:activeSpeakerChangedto distinguish the moment active speaker changes. But it happened thatmedia:activeSpeakerChangedmight arrive significantly later that the only audio slot starts channeling audio for a different participant.I tried to use a different workaround - pin audio slot to use with
receiver-requestedpolicy (like video slots allow to do) but is did not work and the audio slot was still used bywebex-js-sdkwithactive-speakerpolicy.Thus, could you please clarify if
sourceUpdateworks for audio slots and how it can be used?To Reproduce
Steps to reproduce the behavior:
sourceUpdateevent for audio slotssourceUpdateevent handler for audio slot is calledExpected behavior
sourceUpdateevent handler for audio slot is calledActual behavior
sourceUpdatehandler for audio slot is NOT calledPlatform (please complete the following information):