open-webrtc-toolkit / owt-client-javascript

Open WebRTC Toolkit JavaScript SDK
https://01.org/open-webrtc-toolkit
Apache License 2.0
210 stars 127 forks source link

How to identify whether remote stream Video/Audio enabled or not ? #452

Open kurapatijayaram opened 3 years ago

kurapatijayaram commented 3 years ago

Hi, I publish a stream with audio and video, but later I disabled the audio/video, other user subscribed the stream and he wants to know the status of the stream whether audio/video enabled or not.

Is there a way to identify ?

Thanks.

kurapatijayaram commented 3 years ago

One solution is , using MediaStreamTrack we can identify, but, just want to know is there any other way to directly know the status of the stream.

jianjunz commented 3 years ago

Enable or disable a track is defined in Media Capture and Streams. We don't notify other users who subscribe this track. You may send a message to other users when a track is enabled or disabled.

kurapatijayaram commented 3 years ago

It would be really helpful if there are methods like "hasAudio", "hasVideo" in subscription object. All other providers are providing such information, which will be helpful to represent in the view.

Thank you.