getusermedia

Chrome doesn't treat insecure origin as secure despite flag

对着背影说爱祢 提交于 2019-12-02 04:51:01
问题 I want to test getUserMedia on an insecure origin on Chrome on Windows. I am starting Chrome in this way as instructed on goo.gl/rStTGz, a link that shows up in the console if you use insecure origin with getUserMedia : start chrome "http://my-ip:8000/index.html" --unsafely-treat-insecure-origin-as-secure="http://my-ip" --user-data-dir=/tmp In index.html there is this: navigator.getUserMedia({ audio: true, video: { width: 1280, height: 720 } }, stream => console.debug(stream), e => console

How to detect that system connected with microphone using JavaScript

柔情痞子 提交于 2019-12-02 02:56:17
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 connected then also above code giving message "Microphone is connected with your system". so please

Correct way to use MediaRecorder with a time slice argument specified with start

前提是你 提交于 2019-12-02 01:45:57
问题 After reading this page https://developer.mozilla.org/en-US/docs/Web/API/MediaRecorder.start , I have write my own code: var mediaConstraint = { video: true, audio: true }; navigator.getUserMedia(mediaConstraint, function(stream) { var vendorURL = window.URL || window.webkitURL; _video = document.querySelector('#recordingCamera'); _video.src = vendorURL.createObjectURL(stream); _video.play(); var mediaRecorder = new MediaRecorder(stream); mediaRecorder.start(3000); mediaRecorder

Chrome doesn't treat insecure origin as secure despite flag

柔情痞子 提交于 2019-12-02 00:46:52
I want to test getUserMedia on an insecure origin on Chrome on Windows. I am starting Chrome in this way as instructed on goo.gl/rStTGz, a link that shows up in the console if you use insecure origin with getUserMedia : start chrome "http://my-ip:8000/index.html" --unsafely-treat-insecure-origin-as-secure="http://my-ip" --user-data-dir=/tmp In index.html there is this: navigator.getUserMedia({ audio: true, video: { width: 1280, height: 720 } }, stream => console.debug(stream), e => console.error(e)) It still gives me error even though I did what the first link said. This error includes another

What is a TrackStartError?

…衆ロ難τιáo~ 提交于 2019-12-01 17:53:18
I am running audio only sessions using the constraints: var constraints = { audio: { mandatory: { echoCancellation: false }, optional: [{ sourceId: audioSource }] }, video: false }; I am noticing that in a very small number of sessions I am receiving a TrackStartError from the getUserMedia request. I cannot see any correlation between browser/browser version/OS/devices available. Some computers continually get this error, some once and then after a new getUserMedia request no problem and some don't experience this at all. Is the TrackStartError documented fully as I have seen some issues

Not able to access rear camera on webrtc [chrome:54]

与世无争的帅哥 提交于 2019-12-01 13:57:53
I'm trying out webAR demos using webrtc and threejs, while accessing the camera through my android mobile chrome:54 the front camera opens up by default. I checked and tried to fix the issue by referring to all the questions regarding this on stack overflow, even tried to change the array values but no luck. Can anyone please tell me how to access the rear camera by tweaking this code? var THREEx = THREEx || {} navigator.getUserMedia = navigator.getUserMedia || navigator.webkitGetUserMedia || navigator.mozGetUserMedia || navigator.msGetUserMedia; window.URL = window.URL || window.webkitURL; /*

Not able to access rear camera on webrtc [chrome:54]

六月ゝ 毕业季﹏ 提交于 2019-12-01 09:57:20
问题 I'm trying out webAR demos using webrtc and threejs, while accessing the camera through my android mobile chrome:54 the front camera opens up by default. I checked and tried to fix the issue by referring to all the questions regarding this on stack overflow, even tried to change the array values but no luck. Can anyone please tell me how to access the rear camera by tweaking this code? var THREEx = THREEx || {} navigator.getUserMedia = navigator.getUserMedia || navigator.webkitGetUserMedia ||

Send chunks from MediaRecorder to server and play it back in the browser

一世执手 提交于 2019-12-01 09:08:27
问题 With the following code in NodeJS I'm able to play a webm file served from server: app.get('/video', function(req, res){ res.writeHead(200,{ 'Connection': 'close', 'Cache-Control': 'private', 'Content-Type': 'video/webm' }); console.log('Http client connected: Streaming!'); var readStream = fs.createReadStream('./small.webm'); readStream.pipe(res); }); Now I want to get the WebM directly from getUserMedia() API. So I used MediaRecorder within Socket.IO: // Client var mediaRecorder = new

getUserMedia frozen at first frame on Android Chrome

那年仲夏 提交于 2019-12-01 08:12:07
I have a working code on desktop browsers supporting getUserMedia Api, I can correctly see a video preview of my webcam in the div videoPreview . However, when running on Android device, this same code takes a picture with my front camera when I accept to share it in Chrome browser, then the preview keeps frozen on this first frame. navigator.getMedia = (navigator.getUserMedia || navigator.webkitGetUserMedia || navigator.mozGetUserMedia); navigator.getMedia( // constraints {video:true, audio:false}, // success callback function (mediaStream) { var video = document.getElementById('videoPreview'

WebRTC resolution limit

旧城冷巷雨未停 提交于 2019-12-01 06:01:06
I tried this and this , but the maximum resolution I can get is 640x480. The pictures taken by other windows apps by the same camera have the resolution of 1600x1200. Is there any limit for resolution in WebRTC? I cannot find any official documentation about that. You can do it by using constraints and passing those to getUserMedia as shown in the links you provided. It's possible that your webcam only supports 640x480 for video and higher resolutions for still images (this is common). Here's another example, where you can try setting various resolutions and it will print out the corresponding