Questions tagged [mediastream]

The two main components in the MediaStream API are the MediaStreamTrack and MediaStream interfaces. The MediaStreamTrack object represents media of a single type that originates from one media source in the User Agent, e.g. video produced by a web camera. A MediaStream is used to group several MediaStreamTrack objects into one unit that can be recorded or rendered in a media element.

The two main components in the MediaStream API are the MediaStreamTrack and MediaStream interfaces. The MediaStreamTrack object represents media of a single type that originates from one media source in the User Agent, e.g. video produced by a web camera. A MediaStream is used to group several MediaStreamTrack objects into one unit that can be recorded or rendered in a media element. Media Capture and Streams

348 questions
5
votes
0 answers

Web Speech Recognition on MediaStream

Calling SpeechRecognition.start automatically requests microphone permission, but is there any way to start SpeechRecognition on a custom MediaStream (e.g. from getDisplayMedia)?
5
votes
1 answer

Merge two audio tracks into one track

I am having a issue in combining two audio tracks into one, in order to add the whole merged audio to a video track. this.promises = [navigator.mediaDevices.getUserMedia({ audio: true, video: true })]; if (navigator['getDisplayMedia']) { …
5
votes
1 answer

WebRTC transmit high audio stream sample rate

Given a WebRTC PeerConnection between two clients, one client is trying to send an audio MediaStream to another. If this MediaStream is an Oscillator at 440hz - everything works fine. The audio is very crisp, and the transmission goes through…
Amit
  • 5,924
  • 7
  • 46
  • 94
5
votes
0 answers

Redux - How to pass around a MediaStream - should I use a global variable or store non serializable object in the store

I am recording audio from a user's microphone throughout my web app (i.e. the whole time they use it and am streaming it to a backend). I call navigator.mediaDevices.getUserMedia() in a component, say at root level. I also have a MediaRecorder to…
Jeremy
  • 51
  • 1
5
votes
1 answer

Alternative for the ImageCapture API for better browser support

I use an OCR in order to recognize text from images. I take photos/snapshots from the user's camera/video input using the ImageCapture API from a MediaStream. Here is the code responsible for that: function getBlobFromMediaStream() { const…
Mees
  • 75
  • 1
  • 10
5
votes
0 answers

Combining audio and video blob into a single blob to create background music to video?

Is there a way to combine audio blob and video blob into a single blob, thus creating a background music to the video? I tried doing something like this: var combined = [videoBlob, audioBlob]; var newBlob = new Blob(combined); But all it does is…
Andrea G.
  • 215
  • 2
  • 13
5
votes
1 answer

How to react to changes in the dimension/size of a video track in a `MediaStream`?

In my web app I obtain a MediaStream either via getUserMedia or getDisplayMedia. In certain situations, the video track of that stream can change its size. For example, if getDisplayMedia tracks a specific window, that window can change size. Or on…
Lukas Kalbertodt
  • 79,749
  • 26
  • 255
  • 305
5
votes
1 answer

Is there a way to send video data from a video tag/MediaStream to an OffscreenCanvas?

Basically I want to be able to perform effectively this same code: const video = document.getElementById('video'); const canvas = document.getElementById('canvas'); const context = canvas.getContext('2d'); const draw = () => { …
Jacob Greenway
  • 461
  • 2
  • 8
  • 15
5
votes
0 answers

Can´t turn off device flashlight with MediaStreamTrack

I have an issue related with javascript and MediaStreamTrack. I can turn on the device flashlight but (in some devices) i can't turn off unless i would call to MediaStreamTrack stop. I can't call MediaStreamTrack stop because i have a local video…
5
votes
1 answer

Record multi audio tracks available in a stream with MediaRecorder

I'm building a screen recorder plugin for chrome store. I'm adding microphone's audio track to the media stream that contains (Screen's video track + System audio track). So final stream contain 2 audio tracks one of microphone and other one of…
5
votes
0 answers

Safari 11 mediaElement['srcObject'] = mediaStream throws Type Error

I am trying to implement WebRTC using this library (RTCMulticonnection) and am encountering a Type Error when trying to set the 'srcObject' on the video mediaElement in Safari Tech Preview 11. Relevant code: if (isSafari) { //I've tried the 4…
VIN
  • 6,385
  • 7
  • 38
  • 77
5
votes
1 answer

Canvas recording using captureStream and mediaRecorder

How can i record streams from more than one canvas? ie, when i change one canvas to other it has to record the active canvas continue to the first. I have done like this: stream = canvas.captureStream(); mediaRecorder = new MediaRecorder(stream,…
Albin Mathew
  • 604
  • 9
  • 19
5
votes
2 answers

MediaRecorder, captions, and subtitles

Is it possible to use MediaRecorder to mux a WebVTT track (or any other kind of track for captions and subtitles) into the output stream along with the audio and video tracks? WebM supports a WebVTT track. There is a W3C doc from 2012 that briefly…
Brad
  • 159,648
  • 54
  • 349
  • 530
5
votes
3 answers

Removing the recording icon MediaStreamRecorder.js library?

I am using the MediaStreamRecorder.js library for audio capture with Javascript. Almost everything is ok. The only problem I am finding is that when I click on Stop to stop recording the red recording icon is still up there, on the tab. Anyone know…
David Damasceno
  • 173
  • 1
  • 6
4
votes
1 answer

Capturing audio from

I'm working on a project where I'm using
Tinstar
  • 175
  • 12
1 2
3
23 24