MozillaZine

controls preload="none" not working on <video> tag

User Help for Mozilla Firefox
BobAchgill
 
Posts: 3
Joined: May 21st, 2019, 9:24 pm

Post Posted May 21st, 2019, 11:37 pm

Is preload="none" supposed to work to prevent preloading videos with Firefox? I have 2,000 <video> tags on the page. In Chrome the page comes up in 2 seconds at 160MB
...but with Firefox the page loads in 10 seconds at 430MB. My guess is that the culprit is that Firefox is preloading some part or all of each of the 2,000 videos.

I hope this can be solved by html because I do not want to have to ask my users to tweak the about:config.

Thanks!
Bob

therube

User avatar
 
Posts: 20061
Joined: March 10th, 2004, 9:59 pm
Location: Maryland USA

Post Posted May 22nd, 2019, 6:02 am

Can you post a link to the page?
Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US; rv:1.9.1.19) Gecko/20110420 SeaMonkey/2.0.14 Pinball CopyURL+ FetchTextURL FlashGot NoScript

BobAchgill
 
Posts: 3
Joined: May 21st, 2019, 9:24 pm

Post Posted May 22nd, 2019, 10:05 am

Here is the link to my video tag test... http://www.hishandsreader.org/test-video-tags.html
I trimmed my code test down to just the number of video tags that I use.

This is the html at that link...

Code: Select all
<html>
    <head>
    </head>
    <body lang=EN-US link=blue vlink=purple style='text-justify-trim:punctuation'>

<!–– 2,000 of these lines ––>
<p><video name="v" style="display:none" controls preload="none"><source src="video/0030_test1.mp4" type="video/mp4">No support HTML5 video.</video>  ~~ Videotag Test</p>

</body>
</html>



These are my times/memory...
Online--
Chrome: 17 sec 160,000K
Firefox: 55 sec 500,000K

Local--
Chrome: 11 sec
Firefox: 48 sec

Note 1: I will normally run this html locally against videos stored on the local hard drive.
Note 2: Even with no access to the actual video files Firefox is much slower than Chrome... so it must be something other than preload not working?? And wow... why does Firefox use all that memory even if there are no videos accessible??

dickvl

User avatar
 
Posts: 52840
Joined: July 18th, 2005, 3:25 am

Post Posted May 22nd, 2019, 2:37 pm

This looks like a problem with the videocontrols and Firefox is recalculating the page after every new video tag.
I don't know what is triggering a reflow in this case.
A quick test could be to disable the controls on the video elements.

Similar to this bug:
Bug 1373537 - Videocontrols binding constructor triggers layout flushes

https://dxr.mozilla.org/mozilla-release ... ontrols.js

BobAchgill
 
Posts: 3
Joined: May 21st, 2019, 9:24 pm

Post Posted May 22nd, 2019, 10:21 pm

How do I disabled controls on the video elements?
Are you suggesting that I add that js at the end of my page??

What am I giving up to disable controls on the video elements? Would that disable my preload="none" control??

What is the longer term solution?

dickvl

User avatar
 
Posts: 52840
Joined: July 18th, 2005, 3:25 am

Post Posted May 22nd, 2019, 11:54 pm

The video tags have a controls="" attribute if I check this in the Inspector.
https://developer.mozilla.org/en-US/Too ... _Inspector

You can also try a forum like this:
https://stackoverflow.com/questions/

Return to Firefox Support


Who is online

Users browsing this forum: No registered users and 6 guests