コード例 #1
0
        internal RTCStatsReportAsyncOperation(RTCPeerConnection connection, RTCRtpReceiver receiver)
        {
            NativeMethods.PeerConnectionReceiverGetStats(connection.GetSelfOrThrow(), receiver.self);

            connection.OnStatsDelivered = ptr =>
            {
                Value   = WebRTC.FindOrCreate(ptr, ptr_ => new RTCStatsReport(ptr_));
                IsError = false;
                this.Done();
            };
        }
コード例 #2
0
        internal RTCStatsReportAsyncOperation(RTCPeerConnection connection, RTCRtpSender sender)
        {
            NativeMethods.PeerConnectionSenderGetStats(connection.GetSelfOrThrow(), sender.self);

            connection.OnStatsDelivered = ptr =>
            {
                Value   = new RTCStatsReport(ptr);
                IsError = false;
                this.Done();
            };
        }