Closed
Bug 638118
Opened 13 years ago
Closed 13 years ago
Change mozilla.com videos to use html5 video preload attribute
Categories
(www.mozilla.org :: General, defect)
www.mozilla.org
General
Tracking
(Not tracked)
RESOLVED
FIXED
1.4
People
(Reporter: wesj, Assigned: jlong)
References
Details
Attachments
(1 file, 1 obsolete file)
1.43 KB,
text/plain
|
Details |
I recently made a change to Fennec so that videos with no preload attribute don't preload anything in them (bug 631058, still more work to be done there, but this part has landed). However, the video content at http://www.mozilla.com/en-US/firefox/video/ relies on us preloading some amount of video (it checks if video.readyState will return HAVE_CURRENT before it will call video.play I believe). The change in Fennec is a bit controversial, but a low risk (easy?) fix would be to explicitly include preload=metadata on the video elements. Or modify mozilla-video-tool.js to not rely on these attributes.
Comment 1•13 years ago
|
||
Hmm, the suggestion in comment 0 would leave the rest of the sites on the web which do this affected, right?
Reporter | ||
Comment 2•13 years ago
|
||
Yes. Sites that assume we preload video without including a preload attribute may experience problems.
Comment 3•13 years ago
|
||
(In reply to comment #2) > Yes. Sites that assume we preload video without including a preload attribute > may experience problems. So, is that considered a bug on the web page or a bug in the browser? If the former, why are we trying to modify what Fennec does here?
Reporter | ||
Comment 4•13 years ago
|
||
Maybe I probably shouldn't have marked this blocking. This bug is filed against www.mozilla.com, not Fennec.
Comment 5•13 years ago
|
||
Hey James - can you or Anthony pick this one up for the next cycle? It's important for Fennec launch.
Assignee: nobody → jlong
Summary: videos don't play in fennec → Change mozilla.com videos to use html5 video preload attribute
Target Milestone: --- → 1.4
Assignee | ||
Comment 6•13 years ago
|
||
Sure, I'll take it on.
Assignee | ||
Comment 7•13 years ago
|
||
done in r85249 I just added the preload="metadata" attribute. That page actually doesn't use the mozilla-video-tools library to render the video. Is it good enough just to fix that one video?
Reporter | ||
Comment 8•13 years ago
|
||
Hmm... I'm a bit confused. Looks to me like all of the pages use mozilla-video-tools to setup the overlay on top of the video, and to check if it has downloaded data. Videos with no preload attribute won't preload anything in Fennec currently, so none of them will be playable without either 1.) changing mozilla-video-tools to not check if video has been preloaded or 2.) adding a preload attribute to the video.
Assignee | ||
Comment 9•13 years ago
|
||
(In reply to comment #8) > Hmm... I'm a bit confused. Looks to me like all of the pages use > mozilla-video-tools to setup the overlay on top of the video, and to check if > it has downloaded data. You're right, now that I look closer. I haven't seen a video setup like this, I was looking for the VideoPlayer object, but this isn't a different feature of mozilla-video-tools. If the library assuming that the video will be preloaded, it seems like the attribute should be added. I'll get the opinion of the author of mozilla-video-tools.
Assignee | ||
Comment 10•13 years ago
|
||
I'll go ahead and make the library add the preload attribute. Is it ok if the preload attribute is added via javascript after the page loads? It looks like Mike from silverorange wrote the library, so I'll try to get him to do a code review when I'm done.
Assignee | ||
Comment 11•13 years ago
|
||
Here's a patch that will do it. I'd like to get silverorange's opinion on this since they wrote the library.
Assignee | ||
Updated•13 years ago
|
Attachment #519684 -
Flags: review?(steven)
Comment 12•13 years ago
|
||
How about only setting the preload attribute in JS if it's not already set on the video element or if it is set to 'none'? Setting the preload in JS rather than HTML causes about 200 ms of delay loading the video. Only setting it if it's not set or set to 'none' would still fix the problem you are experiencing with Fennec, and still allow setting in HTML on the video page.
OS: Android → All
Assignee | ||
Comment 13•13 years ago
|
||
Good idea, I'll change it. 200ms shouldn't matter since the user won't even press "play" by then, right?
Assignee | ||
Comment 14•13 years ago
|
||
Assignee | ||
Updated•13 years ago
|
Attachment #519684 -
Attachment is obsolete: true
Attachment #519684 -
Flags: review?(steven)
Comment 15•13 years ago
|
||
Patch looks good. We should keep the existing preload="metadata" on the video page though. 200ms is not a lot but makes the video thumbnail take longer to appear and thus diminishes the feeling of responsiveness.
Assignee | ||
Comment 16•13 years ago
|
||
cool. done in r85303 (preload attribute is added to the specific page in r85249) do you have a requirement for when this goes out?
Status: NEW → RESOLVED
Closed: 13 years ago
Resolution: --- → FIXED
Updated•12 years ago
|
Component: www.mozilla.org/firefox → www.mozilla.org
Updated•12 years ago
|
Component: www.mozilla.org → General
Product: Websites → www.mozilla.org
You need to log in
before you can comment on or make changes to this bug.
Description
•