Media
Getting Streams
Get Camera
function startCamera() {
function getCameraStream(stream) {
console.log("Starting Camera");
stream.onended = () => {
console.log("Camera Stream ended.");
};
setCamStream(stream);
}
navigator.mediaDevices
.getUserMedia({
audio: false,
video: true
})
.then(getCameraStream)
.catch(err => {
getUserMediaError(err);
setCameraError(err);
});
}Get Audio
Do it seperate then add as a track to your stream, might be able to just say audio true, but mac makes it jank or something idk
Get Screen
Checking Permissions
Using Stream
Play Video of MediaStream
Record
Actually then using that recording
This sends it to transloadit, but you can also use the base uppy to send straight to S3
Advanced
Recording a web video/audio will not have the duration set in the header. To let the file know the duration, you can skip to the end and it will figure it out.
Constraints
If the browser doesn't support then these are ignored, check navigator.mediaDevices.getSupportedConstraints()
Last updated