Closed Bug 1088473 Opened 10 years ago Closed 6 years ago

Unnecessary resource downloaded

Categories

(Core :: Audio/Video: Playback, defect)

33 Branch
x86_64
Windows 8.1
defect
Not set
normal

Tracking

()

RESOLVED INACTIVE

People

(Reporter: a.derosa, Unassigned)

Details

User Agent: Mozilla/5.0 (Windows NT 6.3; WOW64; rv:33.0) Gecko/20100101 Firefox/33.0
Build ID: 20141011015303

Steps to reproduce:

1. Go to http://jsbin.com/huwexenoka/1/edit?html,output
2. Run the demo
3. Go to http://jsbin.com/doratikeya/1/edit?html,output
4. Run the demo


Actual results:

In one page the video is downloaded and played.


Expected results:

Both pages should act the same, that is the video should not be downloaded and thus not played.
Ideally I'd expect both pages NOT to download the video because as soon as the DOM is ready (DOMContentLoaded event) the "preload" attribute is set to "none" and "autoplay" to "false". However, this behavior may be according to some specifications or whatever other notion I'm missing in terms of how the browser manages the resources of a page.

Said that, even if the video should be downloaded for some reason, the fact that the dummy JavaScript file is placed before the video should not change how the pages work. So, both the demos should act the same: video played or not in both cases.

As a final note Internet Explorer perform the same operation which is NOT download and play the video. Chrome and Opera act the same as Firefox.
Component: Untriaged → Video/Audio
Product: Firefox → Core
> the fact that the dummy JavaScript file is placed before the video should not change how
> the pages work

Just so we're clear... in the linked testcases in a current tip build the video doesn't play in either testcase for me and the network panel in devtools doesn't show it being downloaded in either testcase.  Are you seeing something different?
Flags: needinfo?(a.derosa)
The spec requires you to run the resource selection algorithm to select a <source> at the latest when the first </script> after <video> is parsed, i.e. before the script is run. At this point there is no preload attribute, so if the browser usually downloads videos without a preload attribute, it should do so here. Adding a preload attribute afterwards does not really do anything per spec (maybe it should?).
(In reply to Boris Zbarsky [:bz] from comment #2)
> > the fact that the dummy JavaScript file is placed before the video should not change how
> > the pages work
> 
> Just so we're clear... in the linked testcases in a current tip build the
> video doesn't play in either testcase for me and the network panel in
> devtools doesn't show it being downloaded in either testcase.  Are you
> seeing something different?

Hi. In the first test page the video should play. If it doesn't, click the button "Run with JS" and you'll see it playing.
Flags: needinfo?(a.derosa)
> If it doesn't, click the button "Run with JS" and you'll see it playing.

It doesn't, and clicking the button doesn't make it play....
(In reply to Boris Zbarsky [:bz] from comment #5)
> > If it doesn't, click the button "Run with JS" and you'll see it playing.
> 
> It doesn't, and clicking the button doesn't make it play....

I've just tried on another computer and once again with mine and the video plays. Any chance anyone in CC can try and confirm this issue?
Component: Audio/Video → Audio/Video: Playback
Mass closing because of inactivity.
Please feel free to re-open if still relevant.
Status: UNCONFIRMED → RESOLVED
Closed: 6 years ago
Resolution: --- → INACTIVE
You need to log in before you can comment on or make changes to this bug.