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
Related
I'm using the retina theme for the Shopify site. I'm using video on my home page but it's not autoplay in the chrome. another browser it's playing well...please tell me to need to customize code for autoplay in the chrome browser?
Chrome can autoplay the videos with sound off, so you'll need to add muted attribute.
<video autoplay muted>
...
</video>
https://developers.google.com/web/updates/2017/09/autoplay-policy-changes
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.
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.
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.
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.