Welcome!

By registering with us, you'll be able to discuss, share and private message with other members of our community.

SignUp Now!
  • Guest, before posting your code please take these rules into consideration:
    • It is required to use our BBCode feature to display your code. While within the editor click < / > or >_ and place your code within the BB Code prompt. This helps others with finding a solution by making it easier to read and easier to copy.
    • You can also use markdown to share your code. When using markdown your code will be automatically converted to BBCode. For help with markdown check out the markdown guide.
    • Don't share a wall of code. All we want is the problem area, the code related to your issue.


    To learn more about how to use our BBCode feature, please click here.

    Thank you, Code Forum.

HTML & CSS Help to overlay text

chrisj

Bronze Coder
I have a web page where a page visitor can record from their web cam and then the player displays/plays the recorded video, successfully.
Upon upload, the progress bar appears, and the percentage numbers of progress. I've tried to have the percentage numbers appear over laid on the displayed video without success. Any suggestions to show the percentage numbers over the video screen are appreciated. I have this code:

HTML:
<span id="progress-text"></span>
<video id="js-video" autoplay muted class="video-js vjs-default-skin" playsinline poster="/images/000.png"></video>

And when I tried this, the screen went white upon upload (but the progress-text (percentage numbers displayed successfully):

HTML:
<span id="progress-text">
<video id="js-video" autoplay muted class="video-js vjs-default-skin" playsinline poster="/images/000.png"></video>
</span>

I also have this code:

JavaScript:
        let blobs = [];
        let stream, mediaRecorder, blob;
        const progressBar = document.querySelector('#progress-bar .bar'),
            progressText = document.querySelector('#progress-text');


etc....

            request.upload.onprogress = function (event) {
                const prog = parseInt(event.loaded / event.total * 100);
                console.log(prog);
                progressBar.style.width = prog + '%';
                progressText.textContent = prog + '%';
            }
            request.send(formData);
        }

Any assistance is appreciated.
 

Buy us a coffee!

Back
Top Bottom