JLChen
2021-11-25 5dc625a64cf58d798929f22c3073cd06b837f87a
HDLLinphoneSDKDemoNew/HDLLinphoneSDK/src/main/java/com/hdl/hdllinphonesdk/HDLLinphoneKit.java
@@ -32,6 +32,7 @@
 */
public class HDLLinphoneKit {
    public static final String KEY_TITLE_NAME = "lpTitleName";
    public static final String KEY_SIP_ACCOUNT = "lpSipAccount";
    public static final String HDLLinphoneKitNAME = "HDLLinphoneKit";
    private volatile static HDLLinphoneKit instance;
    private Context viewContext;
@@ -143,8 +144,6 @@
                super.callConnected();
                // 视频通话默认免提,语音通话默认非免提
                toggleSpeaker(true);
                // 所有通话默认非静音
                toggleMicro(false);
            }
            @Override
@@ -381,8 +380,10 @@
            if (isVideoCall) {
                params.enableVideo(true);
                params.enableLowBandwidth(false);
                params.setAudioBandwidthLimit(0); // disable limitation
            } else {
                params.enableVideo(false);
                params.setAudioBandwidthLimit(40); // disable limitation
            }
            if (addressToCall != null) {
@@ -415,6 +416,7 @@
            Call currentCall = HDLLinphoneService.getCore().getCurrentCall();
            CallParams params = HDLLinphoneService.getCore().createCallParams(currentCall);
            params.enableVideo(true);
            params.setAudioBandwidthLimit(0); // disable limitation
            currentCall.acceptWithParams(params);
        } catch (Exception e) {
            e.printStackTrace();
@@ -430,6 +432,7 @@
            Call currentCall = HDLLinphoneService.getCore().getCurrentCall();
            CallParams params = HDLLinphoneService.getCore().createCallParams(currentCall);
            params.enableVideo(enableVideo);
            params.setAudioBandwidthLimit(enableVideo ? 0 : 40);
            currentCall.acceptWithParams(params);
        } catch (Exception e) {
            e.printStackTrace();