I'm having a problem with the HTML5 video player, doesn't show the video, in a html file I have:
<video>
<source src="video.mp4" type='video/mp4; codecs="avc1.42E01E, mp4a.40.2"' />
Video tag not supported.
<video>
I even tried without the codec atributte in chrome I gets nothing, only the black square of the reproductor
the file video.mp4 is inside the same folder of the html, it doesn't even show a preview, nothing!
It should work with HTML5 video tag perfectly. I've put an example for your reference.
<video controls="" autoplay name="media">
<source src="http://www.html5rocks.com/en/tutorials/video/basics/devstories.mp4" type="video/mp4;codecs="avc1.42E01E, mp4a.40.2"">
</video>
This should work perfectly:
<video width="300" height="200" controls>
<source src="movie.mp4" type="video/mp4">
Your browser does not support the video tag.
</video>
Related
How to get those audio and video links to place in html code.when I share file to other devices and open it from there, why the image is not displaying in html and same goes with audio also.
exemple:
<video width="320" height="240" controls>
<source src="movie.mp4" type="video/mp4">
<source src="movie.ogg" type="video/ogg">
Your browser does not support the video tag.
</video>
its about absolute and relative paths...just see this link https://www.w3schools.com/html/html_filepaths.asp
I'm working on a website with a HTML5 video tag. The video doesn't play on the website. But if I test it somewhere else, it plays without a problem.
http://carflow-staging.houston-1.hybridmedia.be/
My code is here:
<video class="video-splash__video" width="720" height="405" autoplay="" poster="http://carflow-staging.houston-1.hybridmedia.be/wp-content/themes/framework_wp/img/videoCarflowBackground.png">
<source src="http://carflow-staging.houston-1.hybridmedia.be/wp-content/themes/framework_wp/video/videoCarflowBackground.mp4" type="video/mp4">
<source src="http://carflow-staging.houston-1.hybridmedia.be/wp-content/themes/framework_wp/video/videoCarflowBackground.ogg" type="video/ogg">
<source src="http://carflow-staging.houston-1.hybridmedia.be/wp-content/themes/framework_wp/video/videoCarflowBackground.webm" type="video/webm">
Your browser does not support the video tag or the file format of this video.
</video>
What could be the issue?
I'm using video tag to display a video in my website. Everything works fine in desktop browser but in chrome mobile browser (android at least) video is not displayed inside the "video container" if I don't push play button. There is a transparent "window" with the play button over it and with the controls below.
I have seen something similar over the internet but there was a light gray background where should be the video before playing it.
I set preload="auto" but it did not work.
<video class="img-responsive video" preload="auto" controls>
<source src="./videos/apresentação.mp4" type="video/mp4">
<source src="./videos/apresentação.ogg" type="video/ogg">
Your browser does not support the video tag.
</video>
Solved! I used poster attribute to apply an image inside video tag:
<video class="img-responsive video" poster="./videos/poster.jpg" preload="auto" controls>
<source src="./videos/apresentação.mp4" type="video/mp4">
<source src="./videos/apresentação.webm" type="video/webm">
<p>Your browser does not support the video tag.</p>
</video>
I have video in .mp4 format. and I want show that in my html page, For that I use following tag
<video controls="controls" class="video-ctrl">
<source src="~/Content/Vedio/Care.mp4" type="video/mp4" />
</video>
This is worked in firefox, but not worked in chrome.
You need webm file to play video on webpage.
Example code below:
<video controls="controls" class="video-ctrl">
<source src="http://techslides.com/demos/sample-videos/small.mp4" type="video/mp4">
<source src="http://techslides.com/demos/sample-videos/small.webm " type="video/webm" controls>
</video>
And Jsfiddle example
I have a video tag looking like this:
<video width="380px" height="190px" controls>
<source src="movie.mp4" type="video/mp4" />
<source src="movie.ogv" type="video/ogg" />
Your browser does not support the video tag.
</video>
This plays the video in Firefox and Chrome. However, IE9 and 10 simply states unreadable source (the video 'box' itself turns up so the tag is supported). Safari doesnt seem to support the video tag and thus I only see my fallback message. However, if I go to the URL directly in any browser I can watch the movie in Firefox + Chrome and download it in IE + Safari.
What should I do to make the video playable in all browsers?
Add this line in your head somewhere.
<script src="http://api.html5media.info/1.1.5/html5media.min.js"></script>
Also try putting your source in the opening video tag.
<video source src="movie.mp4" type="video/mp4" width="380px" height="190px" controls></video>
Hope fully that helps
I usually have four versions of the same video for cross-browser compatibly:
<video width="320" height="240" controls>
<source src="movie.mp4" type="video/mp4">
<source src="movie.ogg" type="video/ogg">
<source src="movie.webm" type="video/webm">
<object data="movie.mp4" width="320" height="240">
<embed src="movie.flv" width="320" height="240">
</object>
</video>
.mp4, .webm, .ogv, and a flash fallback .flv. This has worked well for me cross-browser. Another thing to note is that for mobile, a higher-optimised .mp4 video is more likely to work (I've had issues with this in the past).