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
4
votes
1 answer

Webcam light doesnt turn off after setting the video constraint to false in webRtc

I am using WebRTC and socket.io for video calling. The call is working fine but when I run the turn off camera function, the video stops but the light of my webcam remains on. Here is the function for turning off the camera: const mute = () => { …
Zain Sahi
  • 123
  • 8
4
votes
1 answer

WebRTC vs WebSockets server to client/s (one to many) live video streaming from IP camera

I couldn't find a definitive answer for this, Let's say I have a server that receives an RTSP feed from an IP camera, this stream will be broadcasted to multiple clients, the connection is always initialized by the clients. I am wondering whether it…
4
votes
1 answer

Is it possible to run a javascript proxy that proxy the video's media request on the client side?

I have video files hosted on the CDN, the video file is encrypted. So I need the decrypt it before play it in the browser. But the web video tag has no interface to modify the media stream. So I want to run a proxy in the client side with…
LF00
  • 27,015
  • 29
  • 156
  • 295
4
votes
1 answer

How to get a transcript of an audio or video call within a js web app? I.e. how to route a MediaStream to a speech-to-text API

I want to make a web-app which does video calls with live transcription -- using some 3rd party speech-to-text service (e.g. Google or Amazon). So the peer-to-peer MediaStream would be played to the users, and also sent to the API for…
4
votes
2 answers

How can I catch an issue of MediaRecorder.ondataavailble no longer being called?

I am capturing a user's audio and video with the navigator.mediaDevices.getUserMedia() and then using MediaRecorder and its ondataavailable to store that video and audio blob locally to upload later. Now Im dealing with an issue where for some…
4
votes
3 answers

In WebRTC, how do I label a local MediaStream so that a remote peer can identify it?

I am building a WebRTC application in which users can share their camera and their screen. When a client receives a stream/track, it needs to know whether it is a camera stream or a screen recording stream. This distinction is obvious at the sending…
jameshfisher
  • 34,029
  • 31
  • 121
  • 167
4
votes
1 answer

Does getUserMedia give same or new stream when called more than once?

If your app wants to get the same user media, say the audio with the exact same constraints, more than once, will navigator.mediaDevices.getUserMedia call return a new stream, so will allocate same amount of computing resources, or will it just give…
sçuçu
  • 2,960
  • 2
  • 33
  • 60
4
votes
1 answer

Applying constraints to an audio track from getUserMedia

Is it possible to apply constraints to a running live audio track? It doesn't seem to work for me, at least on Chrome v80. Suppose I have a stream: const stream = await navigator.mediaDevices.getUserMedia({ audio: { autoGainControl: true …
Brad
  • 159,648
  • 54
  • 349
  • 530
4
votes
1 answer

Intermediate data from MediaRecorder getting lost when using React hooks

I'm working on a higher order component that will provide the ability to capture media using the MediaRecorder API. However, when I try to use the captured video (in the form of a Blob passed to createObjectURL) I am getting an error…
4
votes
1 answer

unable to switch camera (front to rear) in react application using webrtc MediaDevices

This is the sample demonstration of what I'm intended to do. If anyone has any idea about this fix to make it work or any new logic please do share. This demonstration is implemented by using mediaStream API and using react-webcam library which…
user8450606
4
votes
0 answers

Access browser audio output with getUserMedia()?

I'm trying to capture audio output from the browser and save a recorded file in JavaScript (without using 3rd party apps or browser extensions). After reviewing the examples at WebRTC samples this task seems to be relatively straightforward when…
4
votes
2 answers

How to get the event Handler for stop sharing button in chrome browser in emberjs

I am using twilio API to implement screen sharing in an emberjs app, I am successfully able to share the screen and also toggle on stopping it. Here is my code -> this.get('detectRtc').isChromeExtensionAvailable(available => { if (available) { …
4
votes
1 answer

Get MediaStreamTrack(audio) from Video

I want to record audio from video element alongside recording from canvas. I have var stream = canvas.captureStream(29); Now I am adding audioTrack of video to the stream. var vStream =…
4
votes
0 answers

Connecting mediastream to canvas

I'm trying to read from a media stream source, make some webgl calls and then update a texture with the modified media stream. How can I connect a media stream to a canvas so that I can read/manipulate the image data? Repeatedly drawing from a video…
MattyB
  • 173
  • 1
  • 6
4
votes
2 answers

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

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…
nvcnvn
  • 4,991
  • 8
  • 49
  • 77