Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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 join this conversation on GitHub. Already have an account? Sign in to comment
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