瀏覽代碼

音频码率临时修改

wolyshaw 3 年之前
父節點
當前提交
fb192fa374
共有 1 個文件被更改,包括 1 次插入1 次删除
  1. 1 1
      src/components/live-broadcast/runtime.ts

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

@@ -401,7 +401,7 @@ export const getTrack = async (trackType: TrackType): Promise<RTC.RCLocalTrack>
   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', {