123
This commit is contained in:
parent
3536c74614
commit
10405cb902
|
@ -147,7 +147,10 @@ namespace JianGongYun.TRTC
|
||||||
WSClient.ReconnectionHappened.Subscribe((info) =>
|
WSClient.ReconnectionHappened.Subscribe((info) =>
|
||||||
{
|
{
|
||||||
Console.WriteLine($"Reconnection happened, type: {info.Type}");
|
Console.WriteLine($"Reconnection happened, type: {info.Type}");
|
||||||
|
if (WSClient.IsRunning)
|
||||||
|
{
|
||||||
WSClient.Send($"{{code:10000,nick:\"{CurrentClassroomEntity.TeacherName}\",\"room\":\"push_{ClassId}\"}}");//进房间
|
WSClient.Send($"{{code:10000,nick:\"{CurrentClassroomEntity.TeacherName}\",\"room\":\"push_{ClassId}\"}}");//进房间
|
||||||
|
}
|
||||||
liveWinMode.WSConneced = true;
|
liveWinMode.WSConneced = true;
|
||||||
});
|
});
|
||||||
WSClient.DisconnectionHappened.Subscribe((info) =>
|
WSClient.DisconnectionHappened.Subscribe((info) =>
|
||||||
|
@ -163,8 +166,11 @@ namespace JianGongYun.TRTC
|
||||||
Heartbeat = new DispatcherTimer(DispatcherPriority.Render);
|
Heartbeat = new DispatcherTimer(DispatcherPriority.Render);
|
||||||
Heartbeat.Interval = TimeSpan.FromSeconds(5);
|
Heartbeat.Interval = TimeSpan.FromSeconds(5);
|
||||||
Heartbeat.Tick += new EventHandler((a, b) =>
|
Heartbeat.Tick += new EventHandler((a, b) =>
|
||||||
|
{
|
||||||
|
if (WSClient.IsRunning)
|
||||||
{
|
{
|
||||||
WSClient.Send("{code:10016}");//向服务器发送心跳包
|
WSClient.Send("{code:10016}");//向服务器发送心跳包
|
||||||
|
}
|
||||||
});
|
});
|
||||||
Heartbeat.Start();
|
Heartbeat.Start();
|
||||||
|
|
||||||
|
@ -456,7 +462,7 @@ namespace JianGongYun.TRTC
|
||||||
{
|
{
|
||||||
if (liveWinMode.MicRunning)
|
if (liveWinMode.MicRunning)
|
||||||
{
|
{
|
||||||
if (tag=="mic")
|
if (tag == "mic")
|
||||||
{
|
{
|
||||||
liveWinMode.MicMute = mute.HasValue ? mute.Value : !liveWinMode.MicMute;
|
liveWinMode.MicMute = mute.HasValue ? mute.Value : !liveWinMode.MicMute;
|
||||||
if (liveWinMode.MicMute)
|
if (liveWinMode.MicMute)
|
||||||
|
|
Loading…
Reference in New Issue