protected override void OnClosed(bool p_result) { Inst = null; // 未挂断时,请求挂断 if (!p_result) { AtMsg.HangUp(Kit.UserID, _detail.OtherID, false); } var js = @"if(element.PeerConnection) element.PeerConnection.Close();"; this.ExecuteJavascript(js); if (_timer != null) { _timer.Dispose(); _timer = null; TimeSpan span = DateTime.Now - _startTime; string msg = string.Format("通话时长 {0:mm:ss}", new DateTime(span.Ticks)); _detail.SendMsg(msg); } else { _detail.SendMsg("取消通话"); } }
protected override void OnClosed(bool p_result) { Inst = null; // 未挂断时,请求挂断 if (!p_result) { AtMsg.HangUp(Kit.UserID, _other.ID, true); } var js = @"if(element.PeerConnection) element.PeerConnection.Close();"; this.ExecuteJavascript(js); if (_timer != null) { _timer.Dispose(); _timer = null; } }