Kriss
Kriss

Reputation: 21

Cordova stops when trying to initialize phonertc

I'm trying to use the PhoneRTC plugin on my Ionic project. I've followed this guide, but everything stops when calling:

var session = new cordova.plugins.phonertc.Session(config); There are no errors, it just stops.

Code:

function call(isInitiator, peer_id) {
    console.log('Før config...');
    var config = {
        isInitiator : isInitiator,
        turn : {
            host : 'turn:<url>'
        },
        stream : {
            audio : true,
            video : false
        }
    };
    console.log('Before');
    //Initiate call
    var session = new cordova.plugins.phonertc.Session(config);
    console.log('After');
    session.on('sendMessage', function(data) {
        SocketService.emit('sendMessage', {
        id : $scope.id,
        peer_id : $scope.peer_id,
        type : 'phonertc_handshake',
        data : JSON.stringify(data)
    });
});

Logcat:

I/chromium(12959): [INFO:CONSOLE(57)] "Before", source: file:///android_asset/www/callController.js (57)
I/chromium(12959): [INFO:CONSOLE(21162)] "[object Object]", source: file:///android_asset/www/lib/ionic/js/ionic.bundle.js (21162)</code>

Do anyone have an idea of what is wrong?

(The plugin is referred in platform/android/res/config.xml)

Upvotes: 0

Views: 334

Answers (0)

Related Questions