How to show HTML5 video on line - html5-video

I'm a new developer. I've created a simple HTML5 page and this is the first time I'm using HTML5 to display a video.
My problem is: I could view the video on my local machine however I can not see it online.
Can someone help to make this video work online?
here is the code :
<!DOCTYPE html>
<html>
<body>
<video width="320" height="240" controls>
<source src="movie.mp4" type="video/mp4">
<source src="movie.webm" type="video/webm" />
<source src="movie.ogg" type="video/ogg">
Your browser does not support the video tag.
</video>
</body>
</html>

You can try something like this:
<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>
You will, of course, have to put the correct src for the file you want to play. Finding the correct path would depend on the server/hosting you are using but if you know how to upload the video online, you should be able to figure out what the correct path is as well. Posting some code in your question would help give you a better answer.

Related

Why Internet download manager doesn't come up in this page?

I noticed that IDM (internet download manager) does not come up in this page when the video starts playing: https://www.w3schools.com/html/html5_video.asp
the code behind this page is a simple html5 video tag:
<video id="video1" style="width:600px;max-width:100%;" controls>
<source src="mov_bbb.mp4" type="video/mp4">
<source src="mov_bbb.ogg" type="video/ogg">
Your browser does not support HTML5 video.
</video>
When I use the exact same code with the same video in localhost, IDM starts. I have no special setting or exclusions in IDM. So what is the secret behind this page that IDM is not starting?
Some videos are protected by Copyright and use special protected protocol. It is restricted to save any data recived by this protocol. IDM does not support it for legal reasons.(Reference)
To check that this is the reason why video is not shown, you need to open "Options->General" IDM dialog and press "Edit" near "Customize IDM Download panels in browsers".

HTML5 video player plays only audio and no video for mkv file

I am trying to play an mkv video in HTML5 video player. When i play the video only audio gets played and no video. Following is my code:
<!DOCTYPE html>
<html>
<body>
<video width="500" controls>
<source src="SampleVideo.mkv">
</video>
</body>
</html>
I am using chrome browser (version 74.0.3729.169).
I know that HTML5 only supports MP4, WebM, and Ogg formats but is their any way to play MKV files properly? Any help on this would really be appreciated.

HTML5 Progressive Video downloadding

I have to make a video gallery in HTML5. I also use symfony 3.4 in my project. I use the HTML5 tag to display video on my page. There is a sample:
<video controls preload="auto" poster="{{ asset('img/poster.jpg') }}" width="100%">
<source src="{{ asset('video/video1.mp4') }}" type="video/mp4">
Your Browser is not supported
</video>
The problem is that, I want my video loading while playing and not playing after loading completed

m3u8 hls vimeo cross domain videojs

I am trying to play a vimeo m3u8 hls video in videojs player. I am getting cross domain error. Can anybody help me.
My code.
<video autoplay id="content_video" class="video-js vjs-default-skin"
poster = "//test.waytogrow.pl/wideo/videojs/posters/android.png" controls preload="auto" width="640"
height="360">
<source src="https://player.vimeo.com/external/155002167.m3u8?p=standard&s=1d09b138bbb4218361013c45d706889df4a80fee"
type="application/x-mpegURL" ></source>
</video>
Error
XMLHttpRequest cannot load https://player.vimeo.com/external/155002167.m3u8?p=standard&s=1d09b138bbb4218361013c45d706889df4a80fee. No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'http://example.com' is therefore not allowed access.
You can't fix this. Only Vimeo can, by adding CORS headers to the responses. Otherwise you need to host the video elsewhere.

.mp4 video doesn't work on my web page

I tried to add a .mp4 video on my web page. And it doesn't work, I got an error in firebug. Bellow is the code:
<video width="320" height="240" controls>
<source type="video/mp4" src="08.mp4" >
</video>
Error:
"NetworkError: 404 Not Found - http://localhost/08.mp4"
HTTP load failed with status 404. Load of media resource http://localhost/08.mp4 failed.
All candidate resources failed to load. Media load paused.
I tried with a .m4v video, and it works fine:
<video width="320" height="240" controls>
<source type="video/mp4" src="Big_Buck_Bunny_Trailer.m4v" >
</video>
If I tried to access http://localhost/08.mp4 I got the following:
A 404 error occurred
Page not found.
The requested URL could not be matched by routing.
No Exception available
Both videos are in the same folder.
Codec information:
Can you tell me please where is the problem?
I solved the problem.
Because I use zend2 framework the folder with video should be in the public folder.
First I put the video in other folder, now I moved it in public and works fine.