Skip to content
This repository has been archived by the owner on Oct 25, 2024. It is now read-only.

Check for the transport id #515

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

philipgiuliani
Copy link
Contributor

@philipgiuliani philipgiuliani commented Jul 23, 2021

Subscriptions is a map and not an array, because of that checking on subscription._audioTrackId|_videoTrackId will actually not work.

For some reason, _audioTrackId and _videoTrackId is actually undefined. I am not sure if this is a good fix. The issue was caused with this commit: 7d31677

For more information, see discussion in open-webrtc-toolkit/owt-server#1037

Closes #513

@jianjunz
Copy link
Collaborator

Thanks for your PR. Perhaps we need to correctly set _audioTrackId and _videoTrackId instead of using transportId since transportId is for transport. Multiple publications, subscriptions can share the same the same transport channel. Sometimes, transportId is the same as stream ID, but it's not guaranteed by design.

@philipgiuliani
Copy link
Contributor Author

Hi, that definitely makes sense. I couldn't find out where the _audioTrackId/_videoTrackId should have been set in the first place.

@jianjunz
Copy link
Collaborator

It could be set after a Subscription is created. And the initial audio track ID and initial video track ID are mediaOptions.audio.from and mediaOptions.video.from in subscribe method. You may store it in a map and read it when a subscription is created. Track IDs might be updated when user updates its source.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Mute/unmute event on subscription not fired when muting audio
2 participants