From 27e9f729fa9532ebc22afea84aa80434b8765fa5 Mon Sep 17 00:00:00 2001 From: JLChen <551775569@qq.com> Date: 星期六, 28 八月 2021 11:37:33 +0800 Subject: [PATCH] 2021-08-28 1.更新SDK --- HDLLinphoneSDKDemoNew/HDLLinphoneSDK/src/main/java/com/hdl/hdllinphonesdk/HDLLinphoneKit.java | 22 ++++++++++++++++------ 1 files changed, 16 insertions(+), 6 deletions(-) diff --git a/HDLLinphoneSDKDemoNew/HDLLinphoneSDK/src/main/java/com/hdl/hdllinphonesdk/HDLLinphoneKit.java b/HDLLinphoneSDKDemoNew/HDLLinphoneSDK/src/main/java/com/hdl/hdllinphonesdk/HDLLinphoneKit.java index ce44248..5f51e41 100644 --- a/HDLLinphoneSDKDemoNew/HDLLinphoneSDK/src/main/java/com/hdl/hdllinphonesdk/HDLLinphoneKit.java +++ b/HDLLinphoneSDKDemoNew/HDLLinphoneSDK/src/main/java/com/hdl/hdllinphonesdk/HDLLinphoneKit.java @@ -150,7 +150,7 @@ @Override public void callEnd() { super.callEnd(); - context.sendBroadcast(new Intent(HDLLinphoneIntercomActivity.RECEIVE_FINISH_VIDEO_ACTIVITY)); +// context.sendBroadcast(new Intent(HDLLinphoneIntercomActivity.RECEIVE_FINISH_VIDEO_ACTIVITY)); } }); @@ -275,9 +275,6 @@ config.done(); } } - core.clearAllAuthInfo();//娓呴櫎鎵�鏈夎璇佷俊鎭�� - -// core.clearProxyConfig();//浠庨厤缃腑鍒犻櫎鎵�鏈変唬鐞嗐�傛敞鎰忥細鐩墠涓嶈兘鐩存帴鍒犳墍鏈変唬鐞嗭紝鍥犱负鏈嶅姟鍣ㄤ笂杩樻槸鏍囪宸叉敞鍐� } } catch (Exception e) { e.printStackTrace(); @@ -290,6 +287,7 @@ public void clearProxyConfig(){ Core core = HDLLinphoneService.getCore(); if (core != null) { + core.setDefaultProxyConfig(null); core.clearAllAuthInfo();//娓呴櫎鎵�鏈夎璇佷俊鎭�� core.clearProxyConfig();//浠庨厤缃腑鍒犻櫎鎵�鏈変唬鐞嗐�� } @@ -383,8 +381,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) { @@ -417,6 +417,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(); @@ -432,6 +433,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(); @@ -559,14 +561,22 @@ * 鑾峰彇褰撳墠閫氳瘽鐘舵�� */ public Call.State getCallState() { - return HDLLinphoneService.getInstance().getCurrentCallState(); + if(HDLLinphoneService.getInstance() == null) { + return null; + }else { + return HDLLinphoneService.getInstance().getCurrentCallState(); + } } /** * 鑾峰彇褰撳墠閫氳瘽鐘舵�佹槸鍚︿负鏉ョ數涓� */ public boolean isIncomingReceivedCallState() { - return HDLLinphoneService.getInstance().getCurrentCallState() == Call.State.IncomingReceived; + if(HDLLinphoneService.getInstance() == null || HDLLinphoneService.getInstance().getCurrentCallState() == null){ + return false; + }else{ + return (HDLLinphoneService.getInstance().getCurrentCallState() == Call.State.IncomingReceived); + } } /** -- Gitblit v1.8.0