浏览代码

Merge branch 'master' of http://git.dayaedu.com/yonge/dy-admin-live

lex-wxl 3 年之前
父节点
当前提交
f4c439e6b8
共有 1 个文件被更改,包括 2 次插入1 次删除
  1. 2 1
      src/components/live-broadcast/runtime.ts

+ 2 - 1
src/components/live-broadcast/runtime.ts

@@ -485,7 +485,8 @@ export const getTrack = async (
   if (trackType === "microphone") {
     res = (await runtime.rtcClient?.createMicrophoneAudioTrack("RongCloudRTC", {
       micphoneId: runtime.selectedMicrophone?.deviceId,
-      sampleRate: 44100,
+      sampleRate:
+        Number(localStorage.getItem("sampleRate") || "44100") || 44100,
     })) as TrackResult;
   } else if (trackType === "microphone2") {
     res = (await runtime.rtcClient?.createMicrophoneAudioTrack("RongCloudRTC", {