Closed
Bug 449141
Opened 16 years ago
Closed 14 years ago
Saving an HTML page does not save the audio and video objects
Categories
(Core :: Audio/Video, defect)
Core
Audio/Video
Tracking
()
RESOLVED
FIXED
People
(Reporter: cajbir, Assigned: cajbir)
Details
Attachments
(1 file, 5 obsolete files)
43.11 KB,
patch
|
cajbir
:
review+
dbaron
:
approval2.0+
|
Details | Diff | Splinter Review |
When saving an HTML document which contains audio and video elements the audio and video objects are not saved.
Assignee | ||
Comment 1•16 years ago
|
||
Assignee: nobody → chris.double
Status: NEW → ASSIGNED
Comment 2•16 years ago
|
||
I'm unfamiliar with the inner workings of the downloads system, so I wonder what happens with your patch if someone tries to save media "files" which actually happen to be "infinite" streams?
The same thing that happens if you try to save any other infinite stream, I guess. We should probably just set a maximum size for all saved objects (if we don't already).
Chris, this seems like low-hanging fruit. Probably should use currentSrc though.
Flags: wanted1.9.2? → wanted1.9.2+
Assignee | ||
Comment 4•15 years ago
|
||
Should saving the page save the media resources specified in all the 'source' elements? For example, would the following save 3 video files:
<video>
<source src='one.ogg'>
<source src='two.mp4'>
<source src='three.webm'>
</video>
or should it save only one file, that of the 'currentSrc' attribute on the video, and remove the 'source' elements when saving?
I'm thinking the first option is probably the one that is required?
Assignee | ||
Comment 5•15 years ago
|
||
This patch takes the first approach mentioned in comment 4 to save all source elements. This matches the intent to save the contents of the entire page rather than just the 'currentSrc' of the playing video element. I'm not sure which is actually the better approach and am open to suggestions if the preference is 'currentSrc' only (and remove source elements when persisting).
Attachment #332289 -
Attachment is obsolete: true
Attachment #459286 -
Flags: review?(roc)
Comment on attachment 459286 [details] [diff] [review]
Persist media and source elements
- nsCAutoString url;
+ nsAutoString url;
uriSource->GetSpec(url);
Don't change this.
Otherwise, lovely!
Attachment #459286 -
Flags: review?(roc) → review+
Do we have any tests for "Save As"?
Assignee | ||
Comment 8•15 years ago
|
||
This contains a test for the persisting of media files. It persists a page containing a video to the tmp directory, checks if the video exists after persisting, then removes the files.
Attachment #460432 -
Flags: review?(roc)
Assignee | ||
Comment 9•15 years ago
|
||
Fixes review comment, carries review forward r+=roc
Attachment #459286 -
Attachment is obsolete: true
Attachment #460435 -
Flags: review+
Comment on attachment 460432 [details] [diff] [review]
Test for media persisting
Nice. Just one suggestion: add some randomness to the file name/directory name, so that we don't ever accidentally see old files and think the test passed.
Attachment #460432 -
Flags: review?(roc) → review+
Assignee | ||
Comment 11•15 years ago
|
||
I had to change the test a fair bit since it turns out it was intermittent as to whether it passed or failed. saveDocument saves the video file asychronously. Changes are:
* add randomness to filename
* add a listener to track the download progress and perform tests when completed.
Attachment #460432 -
Attachment is obsolete: true
Attachment #461107 -
Flags: review?(roc)
Attachment #461107 -
Flags: review?(roc) → review+
Assignee | ||
Comment 12•15 years ago
|
||
Rolled up patch with fix and test. Requesting approval2.0. The is fairly minor, includes a test, and allows people to "Save As" page's containing videos and have the video saved with the page.
Attachment #460435 -
Attachment is obsolete: true
Attachment #461107 -
Attachment is obsolete: true
Attachment #461964 -
Flags: review+
Attachment #461964 -
Flags: approval2.0?
Attachment #461964 -
Flags: approval2.0? → approval2.0+
Assignee | ||
Updated•14 years ago
|
Keywords: checkin-needed
Flags: in-testsuite+
Keywords: checkin-needed
Status: ASSIGNED → RESOLVED
Closed: 14 years ago
Resolution: --- → FIXED
You need to log in
before you can comment on or make changes to this bug.
Description
•