getusermedia

React Native: Webview getUserMedia not working (onPermissionRequest override?)

巧了我就是萌 提交于 2019-12-03 06:57:48
I'm developing an application for iOS, Android and Windows with React Native in which I need to show a webpage through a WebView . That webpage accesses the camera of the device, so it uses MediaDevices.getUserMedia() Javascript function. It works without problems in desktop, even in the Chrome app on the smartphone . However, when I call the webpage via the React Native <WebView /> , I get a PermissionDenied error. The problem is that no request is shown to let me accept that permission. It justs denies the request without asking. Here is a sample of my WebView element: <WebView style={{flex:

Alternative to getUserMedia() for reading live camera stream on iOS?

元气小坏坏 提交于 2019-12-03 06:16:39
We are building a mobile barcode-scanner using QuaggaJS that reads barcodes directly from the device's camera stream. Works fine on desktop/Android, but doesn't work at all on iOS. From initial research, I've found that iOS simply does not support WebRTC/ getUserMedia through Safari or iOS Chrome (related links below), which is what QuaggaJS uses to read the camera stream. I've also seen this question about capturing a still image on iOS, but the answer provided is only for capturing a still image, not for reading the stream real-time. My question - is there any other way to grab the stream

Which Camera will open getUserMedia API in mobile Device? Front or Rear?

不打扰是莪最后的温柔 提交于 2019-12-03 06:05:09
问题 While using getUserMedia API to access camera in desktop it will open web camera.of course it is help to video communication.but which camera is invoked when it is used in mobile device.Front cam or Rear cam?.is there needed code for selecting camera? 回答1: Unfortunately, you cannot (yet?) select this via the code. Mozilla Firefox beta: When the user accepts to share camera, he/she also select what camera to share. Chrome beta: I have only been able to use the face camera. Could be

Saving desktopCapturer to video file in Electron

℡╲_俬逩灬. 提交于 2019-12-03 03:26:58
The desktopCapturer api example shows how to write a screen capture stream to a <video> element. // In the renderer process. var desktopCapturer = require('electron').desktopCapturer; desktopCapturer.getSources({types: ['window', 'screen']}, function(error, sources) { if (error) throw error; for (var i = 0; i < sources.length; ++i) { if (sources[i].name == "Electron") { navigator.webkitGetUserMedia({ audio: false, video: { mandatory: { chromeMediaSource: 'desktop', chromeMediaSourceId: sources[i].id, minWidth: 1280, maxWidth: 1280, minHeight: 720, maxHeight: 720 } } }, gotStream,

Blob video duration metadata [duplicate]

杀马特。学长 韩版系。学妹 提交于 2019-12-03 02:22:32
This question already has an answer here: How can I add predefined length to audio recorded from MediaRecorder in Chrome? 3 answers I am writing a software that manipulates camera stream video in firefox. I am generating a Blob with video type recorded with MediaRecorder API . What i am doing to save the blob as video in local storage is using FileSaver library : FileSaver.saveAs(BlobVideo,"video.mp4"); It seems the video doesnt have any max duration, so i cannot navigate in timeline in my newly generated video in VLC, for example. Is there a way to set duration metadatas on a blob video?

Encode audio from getUserMedia() to a .OGG in JavaScript [duplicate]

ⅰ亾dé卋堺 提交于 2019-12-02 23:21:33
This question already has answers here : converting .wav file to .ogg in javascript (4 answers) So I have this HTML5 project I'm working on, where I'm converting an iOS app to a web-based one. Accompanying part of the content creation of the app is an audio recording, which I'm trying to replicate in JavaScript without the use of plugins; so far, I've been able to record audio from getUserMedia(), and turn it into a WAV thanks to Recorder.js. Now, however, I'm a bit lost. I currently have two separate views, one for recording content and one for playing it back, but I don't know how to get the

Pause the stream returned by getUserMedia

青春壹個敷衍的年華 提交于 2019-12-02 16:11:30
问题 I have channelled the stream returned by getUserMedia to <video> element in html page, video now can be seen in that element. The problem is that if I pause the video from the controls of video element, and then resume after x seconds, then the timer being shown in video element will jump to pauseTime + x seconds. I guess this is because the stream is not getting paused as we pause the playback in video element. If so can we pause the stream too. 回答1: That is the very thing of Streams, you

Pause the stream returned by getUserMedia

此生再无相见时 提交于 2019-12-02 12:30:37
I have channelled the stream returned by getUserMedia to <video> element in html page, video now can be seen in that element. The problem is that if I pause the video from the controls of video element, and then resume after x seconds, then the timer being shown in video element will jump to pauseTime + x seconds. I guess this is because the stream is not getting paused as we pause the playback in video element. If so can we pause the stream too. That is the very thing of Streams, you can't pause them... But what you can do however, is to buffer this stream, and play what you've bufferred. To

How to detect that system connected with microphone using JavaScript

我怕爱的太早我们不能终老 提交于 2019-12-02 07:17:31
问题 I'm using getUserMedia() for audio recording and it works correctly but have an issue with it. I want to display a message before starting recording that any microphone is connected with system or not. For this I have used following code and run this into chrome but it was not working correctly. if(navigator.getUserMedia || navigator.webkitGetUserMedia) { alert("Microphone is connected with your system"); } else { alert("Microphone is not connected with your system"); } when microphone is not

How to check with JavaScript that webcam is being used in Chrome

孤街醉人 提交于 2019-12-02 04:56:22
问题 If webcam is being used in Chrome, there will be a red dot on the tab for that page. And if other pages try to access webcam will get black for video. My question is, is it able to check with JavaScript that webcam is being used? How? By using navigator.getUserMedia, I tried following code: navigator.getUserMedia = navigator.getUserMedia || navigator.webkitGetUserMedia || navigator.mozGetUserMedia || navigator.msGetUserMedia; navigator.getUserMedia({ audio: true, video: true }, function