-
Notifications
You must be signed in to change notification settings - Fork 377
Mute/unmute event on subscription not fired when muting audio #1037
Comments
Hello, |
Hi @starwarfan, I see that you are calling We would use the feature to show other participants that this stream has muted its audio. |
Hi @philipgiuliani, I found an issue which will cause duplicate events (open-webrtc-toolkit/owt-client-javascript#514). But I did not see this missing event issue. It will be helpful if you provide detail steps to produce it. |
Hi @starwarfan , |
I have added the neccessary events to the JS demo applications: philipgiuliani/owt-client-javascript@80e0130 It's just an ugly, quick way to demonstrate the problem. If any of the users call Contrary to my first assumption, the mute event for the video is only called on the MediaStreamTrack. Hope I could help! |
Hi, @philipgiuliani |
Thats what I actually did in my local project but not in the provided example. The example only subscribes to your own stream and to the mixed stream. So my demo technically only has 1 subscription on all other users except yourself (as seen in the console by the logs). |
|
Ok finally we have some progress! Thanks for your time. So I checked out your branch and was able to reproduce it locally. After copying your Owt.js file into my project it also worked without any problem. I think it works because you used an older version of Owt.js. It doesn't seem to be the recent version of Owt 5.0 becuase the last commit in your 5.0-sample branch is from October 2019 🤔 Anyways, as soon as I switch to the latest release of Owt.js it stops working. |
Ok after testing one commit after another I was able to see that it doesn't work after this commit: open-webrtc-toolkit/owt-client-javascript@7d31677 With the previous commit the mute/unmute event still works 👍 |
I did some debugging and the problem is that _audioTrackId and _videoTrackId is actually |
This patch will fix the issue, but I am not sure if checking just diff --git a/src/sdk/conference/channel.js b/src/sdk/conference/channel.js
index 168df38..95f0ea1 100644
--- a/src/sdk/conference/channel.js
+++ b/src/sdk/conference/channel.js
@@ -1120,8 +1120,9 @@ export class ConferencePeerConnectionChannel extends EventDispatcher {
if (this._publications.has(message.id)) {
eventTargets.push(this._publications.get(message.id));
}
- for (const subscription of this._subscriptions) {
- if (message.id === subscription._audioTrackId ||
+ for (const [_key, subscription] of this._subscriptions) {
+ if (message.id === subscription.transport.id ||
+ message.id === subscription._audioTrackId ||
message.id === subscription._videoTrackId) {
eventTargets.push(subscription);
} |
Hi, |
Could the patch help here too? open-webrtc-toolkit/owt-client-javascript#559 |
For debugging purposes, I have currently added the following subscriptions:
When muting the audio channel, the subscription's event listener is never fired. We have also tried to mute the stream with the OWT Management API. We always have the same result. Muting video works, muting audio doesn't.
The text was updated successfully, but these errors were encountered: