diff --git a/JianGongYun/Style/TRTCResource.xaml b/JianGongYun/Style/TRTCResource.xaml index 7e1529c..8a0182c 100644 --- a/JianGongYun/Style/TRTCResource.xaml +++ b/JianGongYun/Style/TRTCResource.xaml @@ -334,7 +334,7 @@ - + diff --git a/JianGongYun/TRTC/LiveClassroom.cs b/JianGongYun/TRTC/LiveClassroom.cs index 999af7d..465cad9 100644 --- a/JianGongYun/TRTC/LiveClassroom.cs +++ b/JianGongYun/TRTC/LiveClassroom.cs @@ -208,6 +208,11 @@ namespace JianGongYun.TRTC { liveWinMode.MicRunning = true; lTRTCCloud.startLocalAudio(settingWindowViewModel.LiveAudioLevel); + if (liveWinMode.IsLive) + { + var pars = new TRTCAudioRecordingParams { filePath = "" }; + lTRTCCloud.startAudioRecording(ref pars); + } } } /// diff --git a/JianGongYun/TRTC/ViewModels/SettingWindowViewModel.cs b/JianGongYun/TRTC/ViewModels/SettingWindowViewModel.cs index ceeeee1..f960ba1 100644 --- a/JianGongYun/TRTC/ViewModels/SettingWindowViewModel.cs +++ b/JianGongYun/TRTC/ViewModels/SettingWindowViewModel.cs @@ -10,6 +10,7 @@ using System.Windows.Controls; using JianGongYun.TRTC.Components; using System.Windows; using ManageLiteAV; +using System.Windows.Media; namespace JianGongYun.TRTC.ViewModels { @@ -420,7 +421,8 @@ namespace JianGongYun.TRTC.ViewModels storage.SetValue(INI_ROOT_KEY, INI_KEY_SCREEN_RECORDING_DIR, value.ToString());//生成保存本地 if (PropertyChanged != null) { - PropertyChanged(this, new PropertyChangedEventArgs("ScreenRecordingDir")); + PropertyChanged(this, new PropertyChangedEventArgs("ScreenRecordingDir")); + PropertyChanged(this, new PropertyChangedEventArgs("DiskSize")); } } } @@ -635,6 +637,35 @@ namespace JianGongYun.TRTC.ViewModels } #endregion + #region 磁盘剩余空间/// + /// 磁盘剩余空间 + /// + public double DiskSize + { + get + { + var disk = ScreenRecordingDir.Substring(0, 1); + var drive = new System.IO.DriveInfo(disk); + return Math.Round(drive.TotalFreeSpace / 1024d / 1024d / 1024d, 1, MidpointRounding.AwayFromZero);//GB + } + } + public string DiskSizeStr + { + get + { + return DiskSize + "G"; + } + } + public Brush DiskTipColor + { + get + { + return DiskSize <= 20 ? Brushes.Orange : Brushes.LawnGreen; + } + } + #endregion + + /// /// ini文件操作 /// diff --git a/JianGongYun/TRTC/Windows/LiveWindow.xaml b/JianGongYun/TRTC/Windows/LiveWindow.xaml index 9428c91..77e129d 100644 --- a/JianGongYun/TRTC/Windows/LiveWindow.xaml +++ b/JianGongYun/TRTC/Windows/LiveWindow.xaml @@ -72,7 +72,7 @@ -