Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

192
Views
WebRTC onicecandidate not getting called in cordova android, but is getting called in browser

I am working on a file sharing project which works on WebRTC, Cordova and Framework7. My code works perfectly fine in a browser but whenever I try to run the same code through an android emulator with Cordova the WebRTC onicecandidate function never seems to get called and I don't get any error messages. If possible I don't want to use any third party libraries and just reuse the same javascript code I already wrote.

function createPeerConn() {
let conf = {
    iceServers: [{ urls: "stun:stun.l.google.com:19302" }],
};
myConn = new RTCPeerConnection(conf, { optional: [] });
myConn.onicecandidate = function (event) {
    if (event.candidate) {
        socket.emit("candidate", event.candidate);
        console.log("create peer con called.")
    }
};
openDataChannel();
} 
about 4 years ago · Juan Pablo Isaza
2 answers
Answer question

0

That would be because RTCIceServers.urls is not supported by ANDROID Webview as per https://developer.mozilla.org/en-US/docs/Web/API/RTCIceServer/urls

about 4 years ago · Juan Pablo Isaza Report

0

The issue was that I still had the cordova-webrtc plugin installed which seemed to switch around some scopes. After removing this plugin everything works as expected.

about 4 years ago · Juan Pablo Isaza Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!