Bug 47569 - Unused <video>, <audio>, or <img> fallback content within an <object> tag is downloaded in the background
Summary: Unused <video>, <audio>, or <img> fallback content within an <object> tag is ...
Status: NEW
Alias: None
Product: WebKit
Classification: Unclassified
Component: Media (show other bugs)
Version: 528+ (Nightly build)
Hardware: Mac (Intel) OS X 10.6
: P2 Normal
Assignee: Nobody
URL: http://catharsis.tumblr.com/html5-vid...
Keywords:
Depends on:
Blocks:
 
Reported: 2010-10-12 20:43 PDT by Marc Hoyois
Modified: 2022-06-30 14:11 PDT (History)
8 users (show)

See Also:


Attachments
Minimal HTML page with a <video> tag within an <object> tag (415 bytes, text/html)
2010-10-12 20:43 PDT, Marc Hoyois
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Marc Hoyois 2010-10-12 20:43:30 PDT
Created attachment 70580 [details]
Minimal HTML page with a <video> tag within an <object> tag

Summary:
When an <object> has a <video> tag as fallback content, the video fallback resource is downloaded even if it is not used, wasting bandwidth.

Steps to reproduce:

Open the attached HTML file which has a 32MB video as fallback to a 3KB QuickTime object, or navigate to the address
http://catharsis.tumblr.com/html5-video-fallback
which demonstrates HTML5 video fallback to a Flash object.

As soon as you open the page, check the Network tab in Activity Monitor and observe as the MBs of the video are being downloaded. The URL of the video also appears in Safari's activity window.

Build Date & Platform:
Tested in OS X 10.6.4 with Safari 5.0.2 and Webkit 6533.18.5, r69611

Additional Information:
<video> fallback is commonly used by websites to make their Flash video content accessible on iPad/iPhones without any extra Javascript or server-side scripting. This bug forces some of these websites to misuse fallback content by making the fallback resource unavailable (404) to desktop user agent (for example: Viddler). As a consequence, desktop users with no Flash cannot access the fallback content. This bug should be squashed before this workaround becomes more common!
Comment 1 Marc Hoyois 2010-10-12 21:11:31 PDT
Correction: don't test the bug on the provided URL with the latest Webkit nightly 69611: it uses the fallback video anyway since the enclosing <object> does not call any plugin (I think previous versions erroneously considered the <video> to be the fallback to the <embed> tag just before it...). Use the attached file instead.
Comment 2 Marc Hoyois 2010-10-12 21:15:36 PDT
I just noticed that the fallback <video> fires a beforeload event, too.
Comment 3 Alexey Proskuryakov 2010-10-13 11:57:48 PDT
Sounds like a bug, but this makes me wonder what the purpose of using <video> as fallback for <object> is. I'd expect the opposite to be more straightforward.
Comment 4 Marc Hoyois 2010-10-13 13:31:57 PDT
(In reply to comment #3)
> Sounds like a bug, but this makes me wonder what the purpose of using <video> as fallback for <object> is. I'd expect the opposite to be more straightforward.

I can't agree more. However, plugins may still offer more advanced features for video playback than a mere HTML/Javascript combination, so when such features are desired it makes sense to use <video> only as a last resort.

This also happens with fallback <audio> and <img> but not with fallback <object> or <embed>, by the way (I modified the bug's title). As far as I can tell there's no reason for it to happen because Safari does not provide a way to access unused fallback content (even if you manually disable plugins you still have to reload the page).
Comment 5 Ahmad Saleem 2022-06-30 09:32:11 PDT
Bug 44827 is now fixed, does that will also fix this? @nrniwa
Comment 6 Ryosuke Niwa 2022-06-30 13:52:50 PDT
No, this bug still exists.