mediastream

Can't preview the video recorded when downloaded - RecordRTC

纵饮孤独 提交于 2020-04-18 05:47:56
问题 steps that will reproduce the problem : I am recording a video using camera of my device using recordRTC and save and download the recorded video. After downloading the recorded video, I can only hear the audio but cannot see the video in my ipad/windows 10 machine . (Suspecting that webm video format is not supported.) initMediaRecorder(mediaStream: MediaStream) { this.mediaRecorder = new window['MediaRecorder'](mediaStream, mimeType: 'video/webm'); const recordedChunks = []; // zone.js

Saving desktopCapturer to video file from Electron app

梦想的初衷 提交于 2020-01-10 03:28:44
问题 Basing on electron api and this question I'm trying to save recorded user screen to .webm file in videos folder in root app folder. Actually it's almost working because it save .webm file but the file which is saved is empty, it weigh 0B.. I don't know what I'm missing here. So it looks like it's somehow not recording correctly because file is empty.. edit when debbuging I discovered that recording is probably working correctly because blobs which I console log has value inside, after

GetUserMedia - facingMode not recognized despite adapter.js

半世苍凉 提交于 2020-01-05 09:24:39
问题 I want to get the video stream of my rear camera in an Ionic Application. For this, I use getUserMedia that work correctly for the front camera. When I change the facing mode to 'environment' I got this error : Unknown constraint named facingMode rejected ConstraintNotSatisfiedError In my Ionic application I have already installed the npm package "webrtc-adapter". Here is my code to get the stream from the rear camera : this.constraints = { audio: true, video: {mandatory: { facingMode:

GetUserMedia - facingMode not recognized despite adapter.js

余生颓废 提交于 2020-01-05 09:23:12
问题 I want to get the video stream of my rear camera in an Ionic Application. For this, I use getUserMedia that work correctly for the front camera. When I change the facing mode to 'environment' I got this error : Unknown constraint named facingMode rejected ConstraintNotSatisfiedError In my Ionic application I have already installed the npm package "webrtc-adapter". Here is my code to get the stream from the rear camera : this.constraints = { audio: true, video: {mandatory: { facingMode:

How to send getusermedia recorded stream to server nodejs realtime

∥☆過路亽.° 提交于 2019-12-25 08:57:54
问题 I am able to send stream blob using socket.io to node js server. But, it is blinking while updating the blob data in video player. I want it to run smooth. How I can send data without blinking of video player. Here is my server code var express = require("express"); var app = express(); var http = require("http").Server(app); var io = require("socket.io")(http); var fs = require("fs") app.use(express.static('public')) app.get("/", function(req, res){ res.sendFile(__dirname+ "/public/index

Sound analysis without getUserMedia

混江龙づ霸主 提交于 2019-12-24 06:24:18
问题 I am trying to analyse the audio output from the browser, but I don't want the getUserMedia prompt to appear (which asks for microphone permission). The sound sources are SpeechSynthesis and an Mp3 file. Here's my code: return navigator.mediaDevices.getUserMedia({ audio: true }) .then(stream => new Promise(resolve => { const track = stream.getAudioTracks()[0]; this.mediaStream_.addTrack(track); this._source = this.audioContext.createMediaStreamSource(this.mediaStream_); this._source.connect

chrome.desktopCapture - can't record both system audio and microphone?

倖福魔咒の 提交于 2019-12-24 01:37:08
问题 I've built a Chrome extension that captures screen activity and microphone input and outputs a video file. Since chrome.desktopCapture can't record audio input alongside screen capture, I'm getting the mic in its own, separate stream. So: //get screen stream chrome.desktopCapture.chooseDesktopMedia(['screen'], null, (stream_id, opts) => { let constraints = {video: mandatory: { chromeMediaSource: 'desktop', chromeMediaSourceId: stream_id }}; navigator.mediaDevices.getUserMedia(constraints)

Capturing an image in HTML5 at full resolution

纵然是瞬间 提交于 2019-12-21 20:55:01
问题 It is possible to capture an image in javascript using the MediaStream API. But in order to do so it is first necessary to instantiate a video object, then paint a frame into a canvas to get an image. But unfortunately many devices (e.g. phones) don't allow you to capture a video at the full native resolution of the device. For instance, on my phone the maximum image resolution is on the order of 4000x3000 but the maximum video resolution is a mere 1920x1080. Obviously capturing an image

How to addTrack in MediaStream in WebRTC

断了今生、忘了曾经 提交于 2019-12-17 06:53:47
问题 I'm using webrtc to communicate between to peers. I wan't to add new track to old generated stream, as I wan't to give functionality to users to switch their microphones during audio communications. The code I'm using is, Let "pc" be the peerConnection object through which audio communication takes place & "newStream" be the new generated MediaStream got from getUserMedia function with new selected microphone device. var localStreams = pc.getLocalStreams()[0]; localStreams.removeTrack

CanvasCaptureMediaStream / MediaRecorder Frame Synchronization

无人久伴 提交于 2019-12-17 05:13:16
问题 When using CanvasCaptureMediaStream and MediaRecorder, is there a way to get an event on each frame? What I need is not unlike requestAnimationFrame(), but I need it for the CanvasCaptureMediaStream (and/or the MediaRecorder) and not the window. The MediaRecorder could be running at a different frame rate than the window (possibly at a not regularly divisible rate, such as 25 FPS vs 60 FPS), so I want to update the canvas at its frame rate rather than the window's. 回答1: This example currently