[Linphone Android] 带视频的呼叫

在呼叫的时候默认进行视频请求:

    public int call(String strDestinationAddr, boolean enableVideo){
        String strIdentify = strDestinationAddr;
        if(-1 == strIdentify.indexOf("@")){
            strIdentify = "sip" + strDestinationAddr +"@" + mLinphoneCore.getDefaultProxyConfig().getDomain();
        }

        try {
            LinphoneAddress lpAddress = LinphoneCoreFactory.instance().createLinphoneAddress(strIdentify);

            LinphoneCallParams params = mLinphoneCore.createDefaultCallParameters();

            if (enableVideo && params.getVideoEnabled()) {
                params.setVideoEnabled(true);
            } else {
                params.setVideoEnabled(false);
            }

            mLinphoneCall = mLinphoneCore.inviteAddressWithParams(lpAddress, params);

            if(enableVideo){
                mLinphoneCore.enableVideo(true, true);
                enableCamera(mLinphoneCall, true);
            }

            mLinphoneCore.enableSpeaker(true);
        }catch (LinphoneCoreException exception){
            Log.d(TAG, exception.toString());

            return -1;
        }

        return 0;
    }

你可能感兴趣的:(android,linphone,呼叫)