webrtc native 声音控制

    xiaoxiao2023-11-12  160

    再次吐槽文档匮乏。

    有个方法可以控制

    public void onAddStream(MediaStream stream) { ... stream.audioTracks.get(0).setVolume(mVolume); }

    参考资料: https://chromium.googlesource.com/external/webrtc/+/lkgr/sdk/android/api/org/webrtc/AudioTrack.java

    /** Sets the volume for the underlying MediaSource. Volume is a gain value in the range * 0 to 10. */ public void setVolume(double volume) { nativeSetVolume(getNativeAudioTrack(), volume); }
    最新回复(0)