Explorar o código

音频码率临时修改

wolyshaw %!s(int64=3) %!d(string=hai) anos
pai
achega
fb192fa374
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  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', {