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, RTCRtpSender sender) { NativeMethods.PeerConnectionSenderGetStats(connection.GetSelfOrThrow(), sender.self); connection.OnStatsDelivered = ptr => { Value = new RTCStatsReport(ptr); IsError = false; this.Done(); }; }