SIP对Cordova/Phonegap的支持

glu*_*nge 8 sip webrtc cordova

在Cordova/Phonegap中是否有可能使用SIP?我还没找到任何插件.WebRTC的支持也不可用(但根据其路线图计划在2.x中).

gli*_*tak 1

如果WebRTC支持可用,您可以直接在 Phonegap 应用程序中加载sipml5 :

    <script type="text/javascript" src="js/SIPml.js"></script>

    var readyCallback = function(e){
        console.log('SIP initialized');
    };
    var errorCallback = function(e){
        console.error('Failed to initialize the engine: ' + e.message);
    }
    SIPml.init(readyCallback, errorCallback);
Run Code Online (Sandbox Code Playgroud)

Android 模拟器似乎不支持 WebRTC,因为我收到此错误:

Uncaught ReferenceError: tsk_utils_init_webrtc is not defined at file:///android_asset/www/js/SIPml.js:203
Run Code Online (Sandbox Code Playgroud)

我还没有在真实设备上尝试过这个...