This commit is contained in:
lxmou666 2021-03-14 18:02:43 +08:00
parent 3536c74614
commit 10405cb902
1 changed files with 9 additions and 3 deletions

View File

@ -147,7 +147,10 @@ namespace JianGongYun.TRTC
WSClient.ReconnectionHappened.Subscribe((info) =>
{
Console.WriteLine($"Reconnection happened, type: {info.Type}");
WSClient.Send($"{{code:10000,nick:\"{CurrentClassroomEntity.TeacherName}\",\"room\":\"push_{ClassId}\"}}");//进房间
if (WSClient.IsRunning)
{
WSClient.Send($"{{code:10000,nick:\"{CurrentClassroomEntity.TeacherName}\",\"room\":\"push_{ClassId}\"}}");//进房间
}
liveWinMode.WSConneced = true;
});
WSClient.DisconnectionHappened.Subscribe((info) =>
@ -164,7 +167,10 @@ namespace JianGongYun.TRTC
Heartbeat.Interval = TimeSpan.FromSeconds(5);
Heartbeat.Tick += new EventHandler((a, b) =>
{
WSClient.Send("{code:10016}");//向服务器发送心跳包
if (WSClient.IsRunning)
{
WSClient.Send("{code:10016}");//向服务器发送心跳包
}
});
Heartbeat.Start();
@ -456,7 +462,7 @@ namespace JianGongYun.TRTC
{
if (liveWinMode.MicRunning)
{
if (tag=="mic")
if (tag == "mic")
{
liveWinMode.MicMute = mute.HasValue ? mute.Value : !liveWinMode.MicMute;
if (liveWinMode.MicMute)