K
K
Karen Grigoryan2015-06-04 15:08:42
Video
Karen Grigoryan, 2015-06-04 15:08:42

Preloader not working in html5, should it be?

Hello.
I use this code on my site:

<video id="video" class="video-js vjs-default-skin" preload="auto" loop autoplay>
<source src="/assets/video/fw1516.mp4" type='video/mp4; codecs="avc1.42E01E, mp4a.40.2"'>
<source src="/assets/video/fw1516.ogv" type='video/ogg; codecs="theora, vorbis"'>
            Your browser does not support the video tag.
</video>

Visually, when I open the page, I see a black square, only after 40-60 seconds (depending on the speed of the Internet) the video starts playing (about 50mb in size). In firebug I see the following picture: all the components of the site are loaded and the video is waiting for the download, and until the video is fully loaded, it will not play.
When you reload the site, everything is OK, because the video is already in the cache.
What to do?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
D
Denis Ineshin, 2015-06-04
@IonDen

preload="auto"
the reason is this. See options: https://developer.mozilla.org/en-US/docs/Web/HTML/... - description of preload. Try with "none" to start with.

K
Karen Grigoryan, 2015-06-05
@grigkar

Uploaded html and video to another server, everything is ok there. The firebug shows that the file has not yet been downloaded and the video is already playing.
Looks like it's in the server.
Mime types I registered in the htaccess file, which is located in the same folder as the video. I don't know what else to do with the server.
By the way, I use hosting on hetzner. No one has seen this?

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question