owt-client-javascript
owt-client-javascript copied to clipboard
[P2P] How to identify a remote stream is Audio or Video ?
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.
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.
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 ?