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

163
Views
In ios, when getUserMedia is called again, the existing stream is killed

Problems with iPad using Safari with video chat app. We want to present the user's video feed and provide the ability to select their own webcam device in a pop-up window. However, to show the selected webcam device, the video of the selected webcam is displayed in a pop-up window, but the original camera feed turns black and the audio is cut off. This seems to happen when calling navigator.mediaDevices.getUserMedia().

my code to get the device

const constraints = {
        speaker: {deviceId: audioOutputSelect.value ? {exact: audioOutputSelect.value} : undefined},
        audio: {deviceId: audioInputSelect.value ? {exact: audioInputSelect.value} : undefined},
        video: {deviceId: videoSelect.value ? {exact: videoSelect.value} : undefined}
    };
navigator.mediaDevices.getUserMedia(constraints).then((stream) => {
    ...
})

The biggest problem is that the audio of the existing video disappears.

about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

this is a known limitation of getUserMedia in Safari, described as far back as 2018 in https://webrtchacks.com/guide-to-safari-webrtc/

If your pop-up video is just a HTML element it should be possible to reuse the MediaStream object but if you are building a "select your camera" dialog this still won't work.

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!