owt-client-javascript
owt-client-javascript copied to clipboard
Cannot get single publication/subscription's statistics
Hi everyone, I am using OWT 5.0.x SDK and I know since 5.0, all publications and subscriptions for the same conference use the same PeerConnection. So when I use getStats( ) function of a single publication/subscription, I can get all the statistics of this PeerConnection, including all publications and subscriptions. I just want to know how to relate the statistics I get from getStats( ) to single publication/subscription.
Thank you.
Hi,
You may need to modify the SDK to get the RTCRtpTransceiver
associated with a publication or a subscription. https://github.com/open-webrtc-toolkit/owt-client-javascript/blob/aa407d632feda4309bb9d2fe0935a1a2e339f6f6/src/sdk/conference/channel.js#L49-L50 But if you publish a stream with a RTCRtpTransceiver
, which is a new feature added after 5.0, you can call getStats
of its RTCRtpSender
or RTCRtpReceiver
.