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(); }; }
internal RTCStatsReportAsyncOperation(RTCPeerConnection connection, RTCRtpReceiver receiver) { NativeMethods.PeerConnectionReceiverGetStats(connection.self, receiver.self); connection.OnStatsDelivered = ptr => { Value = new RTCStatsReport(ptr); IsError = false; this.Done(); }; }
internal RTCStatsReportAsyncOperation GetStats(RTCRtpReceiver receiver) { return(new RTCStatsReportAsyncOperation(this, receiver)); }