2

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

Aleff
  • 61
  • 8
  • As you can see you use normal HTML, so the question is [how to use video in HTML](https://www.geeksforgeeks.org/how-to-insert-video-in-web-page-and-play-it-using-html/). – jcubic Nov 02 '22 at 16:24

2 Answers2

1

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>'));
jcubic
  • 61,973
  • 54
  • 229
  • 402
0

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

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