How to run a video file in jquery-terminal

84 views Asked by At

I am trying to create a website based on the initial graphics of jquery.terminal and I have noticed that there are currently no questions related to video management. I got to see questions related to images, such as this one Creating a Linux terminal themed website using HTML and JavaScript but if I try to use the same writing style in the end I load a blank space.

mpv: function(file) {
    this.echo($('<video src="assets/video/video.mp4">'));
}

enter image description here

2

There are 2 answers

0
jcubic On BEST ANSWER

This is not valid syntax for video in HTML.

The syntax is as follow:

<video width="500px" height="500px"
    controls="controls">
     
    <source src="vid.mp4"
        type="video/mp4"/>
</video>

video tag doesn't accept src attribute only source tags inside.

so you need to use this:

this.echo($('<video><source src="assets/video/video.mp4"/></video>'));
0
Arnav Katyal On

You have the extra "file" parameter in your function. It should be:

mpv: function () {
this.echo($('<video src="assets/video/video.mp4"></video>'));
}