I have a website for streaming
I use this
<div>
<div style="position:relative;padding-top:56.25%;">
<iframe src="https://www.dropbox.com/s/j2j9ua0m1w3hqco/A%20Confused%20Instrument%20_%20Dameon%20Makes%20Music%20%2315.mp4?raw=1" frameborder="0" allowfullscreen
style="position:absolute;top:0;left:0;width:100%;height:100%;"></iframe>
</div>
</div>
how to stop auto download automatically?
enter image description here
You shouldn't open a video file in an <iframe> (it expects to process HTML code).
Use the <video> tag to decode/display the video data.
<!DOCTYPE html>
<html>
<body>
<div>
<div style="position:relative;padding-top:56.25%;">
<video controls style="position:absolute;top:0;left:0;width:100%;height:100%;">
<source src="https://www.dropbox.com/s/j2j9ua0m1w3hqco/A%20Confused%20Instrument%20_%20Dameon%20Makes%20Music%20%2315.mp4?raw=1" type="video/mp4">
</video>
</div>
</div>
</body>
</html>
Related
I want to make an mp4 video player in my HTML website.
I use this code in the body:
<html>
<head>
<title>Document></title>
<body>
<video width="400" controls>
<source src="video.mp4" type="video/mp4">
</video>
</body>
</html>
When I save it and refresh my website in the browser, there is an mp4 box but the video is not playing.
you need to pass the value muted if you are using it in chrome as mentioned here
In some browsers (e.g. Chrome 70.0) autoplay doesn't work if no muted attribute is present.
<video width="400" autoplay controls muted>
It seems you are new to html because you don't do indentation correctly and you did not close the <head> :
The right way to do it is :
<html>
<head>
<title>Document</title>
</head>
<body>
<video width="400" controls>
<source src="video.mp4" type="video/mp4" />
</video>
</body>
<html>
I think you should review your fundamentals before continuing.
I am using uihtml in matlab to play a video,I could embed a video in the uifigure,but it plays when I press the play button.
Is there a way to autoplay a video in uihtml in matlab?
my current HTML script looks like this :
<!DOCTYPE html>
<html>
<body style="background-color:black;font-family:arial;">
<video width="583" height="325" controls autoplay>
<source src="./movie.ogg" type="video/ogg">
Your browser does not support the video tag.
</video>
</body>
</html>
Found a solution for this, 'muted' should be added with autoplay to enable autoplay in uihtml in matlab
<!DOCTYPE html>
<html>
<body style="background-color:black;font-family:arial;">
<video width="583" height="325" autoplay muted loop>
<source src="./movie.ogg" type="video/ogg">
Your browser does not support the video tag.
</video>
</body>
</html>
I've a video embedded in my HTML, and it autoplays on reload. I want to disable the autoplay feature. I've tried autoplay = "false" property , but it doesnt work.
Here's my code
<html>
<body>
<div>
<iframe src="https://d1a2y8pfnfh44t.cloudfront.net/b79fac80851111e3b3e3a539a6199a02/full/540p/index.mp4" width="560" height="315" frameborder="0" allowfullscreen>
</iframe>
</div>
</body>
</html>
Here I used loop attribute to play this video in a loop. But in chrome the video plays and stops at the end of the video. It is not working in a continuous loop in chrome browser. It works in Mozilla Firefox.
<body>
<section id="home" style="height: 110%;">
<!--section added-->
<video id="video" width="100%" height="100%" autoplay loop>
<!--video tag added-->
<source src="main-video.webm" type="video/webm" />
<!--video added-->
</video>
</section>
</body>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html><head><title>Video</title>
<style type="text/css"></style>
<link rel="stylesheet" href="css.css" type="text/css">
</head>
<body>
<div id="Content"><br>
<video width="854" height="480" controls="controls">
<source src="MyMovie.mp4" type="video/mp4">
stuff
</div>
</body>
</html>`
When I view this on Google Chrome I get the video, but none of the buttons can be pressed and the video doesn't start.
If you don't see the buttons, this is probably an issue related with your CSS.
To have the video start automatically, use the parameter autoplay="autoplay" (parameters of HTML5 video):
A demo of a working video in JsFiddle.
Working code:
<div id="Content"><br>
<video width="854" height="480" controls="controls" autoplay="autoplay">
<source src="http://techslides.com/demos/sample-videos/small.mp4" type="video/mp4">
stuff
</video>
</div>
Answer by #Wayne: I believe the answer is here stackoverflow.com/a/12174154/483536 Chrome can play .mp4 with H-264 video but not MPEG-4 Visual video. and there should be a closing tag.
wrong doctype "<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">"
HTML5 doctype is: <!DOCTYPE html>
add appropriate codecs as below:
<source src="MyMovie.mp4" type='video/mp4; codecs="avc1.42E01E, mp4a.40.2"'>