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