AnswerBun.com

Fail Record video Html

I am creating a component that allows me to create a video with the webcam, using MediaStream. I can’t find how I can start recording the video. Any ideas what I will be missing?

 inicial: function (component, event, helper) {

        var width = 300; // scale the photo width to this
        var height = 0; // computed based on the input stream

        var streaming = false;
        var video = null;
        var canvas = null;
        var photo = null;
        var startbutton = null;
        video = document.getElementById('video1');
        canvas = document.getElementById('canvas');

        var streamRecorder;
        var webcamstream;

        navigator.mediaDevices.getUserMedia({
                video: true,
                audio: true
            })
            .then(function (stream) {
                video.src = window.URL.createObjectURL(stream);
                video.srcObject = stream;
                video.play();
            })
            .catch(function (err) {
                alert("An error occurred: " + err);
            });

           }

Salesforce Asked by Daniela Cerqueira on January 2, 2021

0 Answers

Add your own answers!

Related Questions

Change retURL for ChangePassword page

1  Asked on February 16, 2021 by eric-strom

   

Trigger Helper & Trigger Utility Classes

1  Asked on February 14, 2021 by j-neilan

   

SFDX Source retrieve duplicating classes

1  Asked on February 13, 2021 by vrr

 

Ask a Question

Get help from others!

© 2022 AnswerBun.com. All rights reserved.