Home > Software engineering >  embedded video not playing in HTML
embedded video not playing in HTML

Time:08-13

<div >
    <p>We are a family united against all odds, everyone in our family brand is a king and a queen. The goals we set are a priority, and nothing will stop us from achieving them. We will be up against many challenges but we represent the people who keep fighting to see it through to the end. Everyone is essential in our Kingdom, and nothing will break equality in terms of our strength and dependability on one another. We are simply sovereign, and our Kingdom is superior to the other brands.</p>
    <p>We face no competition as we are unique in our product delivery in both quality and service. The service delivery is one befitting loyalty as we are members of the Loyal family. Our rules and code of conduct are one , we don’t break them, nor do we change. We will continue to rule and conquer all other brands that come our way. We are meant to last for eternity, and no forces of weather, external or internal, will affect us as we are committed to the goals and visions of the royal hood. This is the brand for you and all of us, and by simply coming together, we make the league of kings and queens simply unbreakable.We face no competition as we are unique in our product delivery in both quality and service. The service delivery is one befitting loyalty as we are members of the Loyal family. Our rules and code of conduct are one , we don’t break them, nor do we change. We will continue to rule and conquer all other brands that come our way. We are meant to last for eternity, and no forces of weather, external or internal, will affect us as we are committed to the goals and visions of the royal hood. This is the brand for you and all of us, and by simply coming together, we make the league of kings and queens simply unbreakable.</p>

    <div >
        <video width= 100%; height= 100%; controls loop autoplay>
            <source src="video/TheKingdom.mov" type="video/mov">
          Your browser does not support the video tag!
        </video>
    </div>
</div>

Hey, so my video is not showing up when I view it on a live server. Are there any possible issues with my code so far that is keeping me from viewing the video? The only time the video shows up is when I place "control" in the tag other than that the browser is just blank. When I change the file from .mov to .mp4 it plays but without the video showing.

CodePudding user response:

Mov video files are unsupported by most browsers, so you need to convert the file to another Format like mp4.

CodePudding user response:

the reason the code directory is not working is because of the following code snippet "type="video/mov" the problem will disappear when this code directory is changed as follows

type="video/mp4"

full code:

<video width= 100%; height= 100%; controls loop autoplay>
  <source src="video.mp4" type="video/mp4">
</video>

CodePudding user response:

The attributes in your video tag are invalid. Browsers will probably try to somehow correct it and display it anyhow, but:

Your code is: <video width= 100%; height= 100%; controls loop autoplay> --> The width and height attributes must not be written like this.

The two valid possibilities to write them are either this:

<video width="100" height="100" controls loop autoplay>

(But in this case the width and height value units will be pixels.)

...or this way, using the style attribute, where you can use the percentage values (but no quotes inside that!), which is probably what you want:

<video style="width=100%;height=100%;" controls loop autoplay>
  • Related