mozilla-b2g/gaia — pull request #6474 by davidflanagan (2012-11-17 10:34:22+00:00)
Title: Bug 808959 - display and play captured videos in gallery app

This pull request adds the ability to display and play videos to the gallery app. Its a big one. Changes include:

- The MetadataParser.js file now includes simple metadata parsing for videos, mainly to capture a thumbnail image.

- Gallery.js has a clever algorithm for interleaving two separate mediadb enumerations so that photos and videos come out in chronological order even though they're being enumerated separately.

- There is a new VideoPlayer.js and VideoPlayer.css module, some of which is copied from the video app. This includes some new images.

- There is a new Frame.js module. A "frame" displays either an image or a video. The gallery app uses three frames side-by-side so that the user can pan between them. The old PhotoState abstraction has been merged into Frame.

- Some localized strings have changed because they used to be photo-specific, and now must be reworded to more generically refer to photos or videos.

- Lots of internal variable names and function names have changed so that they are not photo-specific. Also element ids and CSS class names have changed. (All these changes inflate the size of this patch).

- as part of the refactoring of gallery.js to use the new Frame objects, there has been other refactoring, too. Notably, a lot of UI initialization code has been grouped in a new initUI() function.

- the open.js file has also been refactored to use the Frame class.

- there is a small bug fix to mediadb