owt-client-javascript icon indicating copy to clipboard operation
owt-client-javascript copied to clipboard

[P2P] How to identify a remote stream is Audio or Video ?

Open shakthi-prashanth-m opened this issue 5 years ago • 2 comments

Suppose that I publish a stream (audio or video). On the peer side (C++ client), OnStreamAdded() gets called; but there is no way to find out whether its an audio stream or video stream.

I want to identify whether a remote stream created is audio or video in P2P mode.

I tried to set attributes on the Stream class, but it is not supported for P2P. :-(

Can someone help in this ? Thanks.

shakthi-prashanth-m avatar Oct 21 '20 00:10 shakthi-prashanth-m

Thanks for reporting this issue. I think we need to add API HasAudio() and HasVideo() in the owt::base::Stream base class. Since this is a C++ issue, suggest moving the issue to owt-client-native.

taste1981 avatar Oct 21 '20 02:10 taste1981

Thanks for the quick response @taste1981 .

Currently this need can be satisfied if attributes is enabled. In that case, I can add attribute { kind: "audio" } in the sender side, and get them via remote_stream->Attributes(). As per documentation, it is not supported in P2P mode. Can this be supported ?

shakthi-prashanth-m avatar Oct 21 '20 04:10 shakthi-prashanth-m