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

Cannot get single publication/subscription's statistics

Open milanyummy opened this issue 3 years ago • 1 comments

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.

milanyummy avatar Nov 12 '21 07:11 milanyummy

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.

jianjunz avatar Jan 11 '22 06:01 jianjunz