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

168
Views
Sending a stream from native to webview

I am developing Webview with react native and facing an issue.

I have started working with peerjs to stream to mic and camera, problem is it asked me twice for permissions to the camera and mic, once in the native level and second in the webview level (prompt also shows the website address).

To prevent that, i am inserting webrtc directly on native (react-native-webrtc lib) and trying to stream to the video element inside the webrtc through injectJavaScript. Problem is it doesn't know how to work with the stream object and breaks the JS code.

I did this test on iOS only. Code:

this.webView.injectJavaScript(`
video = document.getElementById('myvid');   
video.srcObject = data;
video.on("loadedmetadata", () => {
    alert(0);
    video.play();
});

`);

The code doesn't do anything, probably breaks the JS because I've tried to see if it continues but it stops after the line: video.srcObject = data;

Is there a way to solve it?

Thank you!

about 4 years ago · Juan Pablo Isaza
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!