Closed Bug 793372 Opened 8 years ago Closed 8 years ago

[DeviceStorage]: recognize 3gp videos and m3u and pls playlists

Categories

(Core :: DOM: Core & HTML, defect)

x86
macOS
defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla19
blocking-basecamp +
Tracking Status
firefox18 --- fixed
firefox19 --- fixed

People

(Reporter: djf, Assigned: djf)

References

Details

Attachments

(1 file, 4 obsolete files)

In order to support playlists in the Gaia music app, the app needs to be able to read playlist files like .m3u (http://en.wikipedia.org/wiki/M3U) files. So we need to add that extension to the list for the "music" type.
Attached patch patch (obsolete) — Splinter Review
Doug,

The attached patch adds the .m3u extension to devicestorage.properties.

Is that enough to get .m3u files returned? How do they get a mime type mapped to them? Where is that handled? I'm not sure I care about that, though. For the Gaia music app I'm okay just looking at the file extension.
Attachment #663656 - Flags: review?(doug.turner)
Comment on attachment 663656 [details] [diff] [review]
patch

Review of attachment 663656 [details] [diff] [review]:
-----------------------------------------------------------------

This patch allows device storage to return m3u files.  it doesn't not allow gecko to play them, or support them natively.

If you want to map mime types to file extensions, that would be a different bug.  Dave Hylands has some experience with that.
Attachment #663656 - Flags: review?(doug.turner) → review+
Sorry Doug, but could you review it again. I've just added one more playlist file extension.

Also, I just noticed that the line for pictures ends with semicolon but the line for movies does not.  I have a terminate semicolon for music now.  Is that harmless?
Attachment #663656 - Attachment is obsolete: true
Attachment #664353 - Flags: review?(doug.turner)
Comment on attachment 664353 [details] [diff] [review]
revised patch that also adds .pls files

Review of attachment 664353 [details] [diff] [review]:
-----------------------------------------------------------------

could you add a semi after the videos line?
Attached patch patch version 3 (obsolete) — Splinter Review
This version actually removes the trailing semicolons, based on the example in filepicker.properties

And in addition to adding .pls to music, it also adds 3gp to photos since the camera will store videos of that type in the same directory as pictures.
Attachment #664353 - Attachment is obsolete: true
Attachment #664353 - Flags: review?(doug.turner)
Attachment #664588 - Flags: review?(doug.turner)
For what its worth, I built gecko with these changes (comments, removed trailing semicolons) and the Gaia media apps still work, so it doesn't look like I broke anything. 

I'll remove the .3gp in order to land the playlist changes if that would make it quicker.
Attached patch patch version 4 (obsolete) — Splinter Review
I lost the argument about video files in pictures type, so I've taken that out.

The patch now does these things:

1) Adds a comment at the top of the file
2) Removes trailing semicolons
3) Adds *.m3u and *.pls playlist extensions to the music types
Attachment #665172 - Flags: review?(doug.turner)
Version 3 of the patch is obsolete, but I forgot to mark it as obsolete when I attached the new version, and now I can't figure out how to do that.
Attachment #664588 - Attachment is obsolete: true
Attachment #664588 - Flags: review?(doug.turner)
Let's get this reviewed and landed ASAP. Its now blocking playback of videos recorded by the camera!
Attachment #665172 - Attachment is obsolete: true
Attachment #665172 - Flags: review?(doug.turner)
Attachment #670579 - Flags: review?(doug.turner)
changing the bug title to reflect the new main point, which is getting recorded videos to play.
Summary: [DeviceStorage]: recognize .m3u playlist files as music files → [DeviceStorage]: recognize 3gp videos and m3u and pls playlists
nominating blocking, since we need this to play videos from the camera
blocking-basecamp: --- → ?
Comment on attachment 670579 [details] [diff] [review]
recognize 3gp videos and m3u and pls playlists

Review of attachment 670579 [details] [diff] [review]:
-----------------------------------------------------------------

::: toolkit/content/devicestorage.properties
@@ +1,4 @@
> +# Extensions we recognize for DeviceStorage storage areas
> +pictures=*.jpe; *.jpg; *.jpeg; *.gif; *.png; *.bmp
> +music=*.mp3; *.ogg; *.m4a; *.m4b; *.m4p; *.m4v; *.m4r; *.3gp; *.mp4; *.aac; *.m3u; *.pls
> +videos=*.avi; *.divx; *.flv; *.m4v; *.mkv; *.mov; *.mp4; *.mpeg; *.mpg; *.ogm; *.ogv; *.ogx; *.rm; *.rmvb; *.smil; *.webm; *.wmv; *.xvid; *.3gp

go ahead and add trailing semicolons to each line.
Attachment #670579 - Flags: review?(doug.turner) → review+
Doug,

I think the semicolons are separators, not terminators.  filepicker.properties does not have them, which is why I removed them here. (See comments 5 & 6).

So I'm going to ignore that review comment and request checkin.
Keywords: checkin-needed
Whiteboard: needs-checkin-aurora
Chris,

this patch is ready to land, if you want to shepard it through
https://hg.mozilla.org/mozilla-central/rev/e56bbbca15e5
Status: NEW → RESOLVED
Closed: 8 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla19
Comment on attachment 670579 [details] [diff] [review]
recognize 3gp videos and m3u and pls playlists

[Approval Request Comment]
Bug caused by (feature/regressing bug #): 
User impact if declined: 
Testing completed (on m-c, etc.): 
Risk to taking this patch (and alternatives if risky): 
String or UUID changes made by this patch:
Attachment #670579 - Flags: approval-mozilla-aurora?
David,

This landed 3+ weeks ago. We don't need the approval flag now, do we?
(In reply to David Flanagan [:djf] from comment #18)
> David,
> 
> This landed 3+ weeks ago. We don't need the approval flag now, do we?

Comment 15 suggests this patch has already landed on aurora , hence you would not need the approval flag at this time
Comment on attachment 670579 [details] [diff] [review]
recognize 3gp videos and m3u and pls playlists

Already landed in aurora
Attachment #670579 - Flags: approval-mozilla-aurora? → approval-mozilla-aurora-
Component: DOM → DOM: Core & HTML
You need to log in before you can comment on or make changes to this bug.