111
This commit is contained in:
parent
bcd75c83c2
commit
cdd02b0c05
|
@ -280,14 +280,25 @@ namespace JianGongYun.TRTC
|
|||
{
|
||||
liveWinMode.MicRunning = true;
|
||||
lTRTCCloud.startLocalAudio(settingWindowViewModel.LiveAudioLevel);
|
||||
if (liveWinMode.IsLive && !liveWinMode.AudioRecordRunning)
|
||||
{
|
||||
liveWinMode.AudioRecordRunning = true;
|
||||
//var time = Util.TimeStr();
|
||||
var pars = new TRTCAudioRecordingParams { filePath = Path.Combine(RecoderDir, $"temp_audio.wav") };
|
||||
var res = lTRTCCloud.startAudioRecording(ref pars);
|
||||
//Console.WriteLine(res);
|
||||
}
|
||||
//if (liveWinMode.IsLive && !liveWinMode.AudioRecordRunning)
|
||||
//{
|
||||
// liveWinMode.AudioRecordRunning = true;
|
||||
// //var time = Util.TimeStr();
|
||||
// var pars = new TRTCAudioRecordingParams { filePath = Path.Combine(RecoderDir, $"temp_audio.aac") };
|
||||
// var res = lTRTCCloud.startAudioRecording(ref pars);
|
||||
// //Console.WriteLine(res);
|
||||
//}
|
||||
}
|
||||
}
|
||||
public static void StartRecordAudio()
|
||||
{
|
||||
if (liveWinMode.IsLive && !liveWinMode.AudioRecordRunning)
|
||||
{
|
||||
liveWinMode.AudioRecordRunning = true;
|
||||
//var time = Util.TimeStr();
|
||||
var pars = new TRTCAudioRecordingParams { filePath = Path.Combine(RecoderDir, $"temp_audio.aac") };
|
||||
var res = lTRTCCloud.startAudioRecording(ref pars);
|
||||
//Console.WriteLine(res);
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
|
@ -365,7 +376,7 @@ namespace JianGongYun.TRTC
|
|||
//摄像头大画面位置
|
||||
var bigRoi = BackgroundFrame[new OpenCvSharp.Rect((backWidth - backHeight) / 2, 0, backHeight, backHeight)];
|
||||
|
||||
|
||||
StartRecordAudio();
|
||||
while (!end)
|
||||
{
|
||||
stopwatch.Restart();
|
||||
|
|
|
@ -149,8 +149,8 @@ namespace JianGongYun.TRTC.Windows
|
|||
LiveClassroom.StartVideoSub(AfterLiveSubViewWrap);
|
||||
}
|
||||
LiveClassroom.StartMic();
|
||||
LiveClassroom.SetMicMute(false);
|
||||
LiveClassroom.VideoRecordTask(ref onEnd);//启动录制
|
||||
LiveClassroom.SetMicMute(false);
|
||||
|
||||
}, SettingWindowViewModel.ScreenRecordingCountdown);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue