cordova-rtc / cordova-plugin-iosrtc

Cordova iOS plugin exposing the WebRTC W3C API
MIT License
690 stars 338 forks source link

Simple Jitsi App #672

Closed markarupert closed 3 years ago

markarupert commented 3 years ago

YOU MUST read first!

Please use Community Forum for general technical discussions and questions.

Note: If the checkboxes above are not checked (which you do after the issue is posted), the issue will be closed, removing this checkbox will result in automatic closed issue.

Versions affected

Plugins used: cordova-custom-config 5.1.0 "cordova-custom-config" cordova-plugin-compat 1.2.0 "Compat" cordova-plugin-iosrtc 6.0.20 "iosrtc" cordova-plugin-splashscreen 5.0.3 "Splashscreen" cordova-plugin-statusbar 2.4.3 "StatusBar" cordova-plugin-whitelist 1.3.4 "Whitelist" es6-promise-plugin 4.2.2 "Promise"

Description

My ultimate goal is to get the low-level Jitsi API working on my Cordova Phongap app. I am not finding many helpful discussions about it so I am attempting to start with the JitsiMeetExternalAPI as a simple sample app.

I am getting this error: NotAllowedError: The request is not allowed by the user agent or the platform in the current context, possibly because the user denied permission.

The App allows access to the camera and micro phone so I am not sure why I get this error.

Steps to reproduce

This is my code:

       var needMic = true;
        var needCamera = true;
        var constraints = { audio: true, video: { width: 1280, height: 720 } };

        cordova.plugins.iosrtc.registerGlobals();
        cordova.plugins.iosrtc.debug.enable('*', true);

    var domain = "meet.jit.si";
    var options = {
      roomName: "JitsiMeetAPIExample1221121212",
      width: 700,
      height: 500,
      parentNode: undefined,
      configOverwrite: {
        disableDeepLinking: true
      },
      interfaceConfigOverwrite: {
        filmStripOnly: true
      }
    }
    var api = new JitsiMeetExternalAPI(domain, options);

Expected results

Connecting with Camera and Mic

Actual results

Not connecting with Camera and Mic

hthetiot commented 3 years ago

Thank you for reporting properly @markarupert

You may want to look at the existing sample application and add or provide an index-jisti.js equivalent. See https://github.com/cordova-rtc/cordova-plugin-iosrtc-sample/tree/master/www/js

I don't have access to a Jisti server the for the help i can give you is limited. I do recommand to look at the existing samples and inject Jisti after cordova-plugin-iosrtc register global, this is most likely an issue with Jisti library keeping references to WebRTC API prior cordova-plugin-iosrtc register Global call.

hthetiot commented 3 years ago

Notice look at Jisti version in readme this is the version people in the community have confirmed to works in the pats with iosRTC.

hthetiot commented 3 years ago

NotAllowedError: The request is not allowed by the user agent or the platform in the current context, possibly because the user denied permission.

Most likely due the fact that it got refused once and you need to go in setting to change back the permission manually.