Confirmed users
243
edits
Bobbychien (talk | contribs) (→Media Supported File Format: break line) |
|||
| (7 intermediate revisions by 2 users not shown) | |||
| Line 1: | Line 1: | ||
===Media Supported File Format=== | ===Media Supported File Format=== | ||
These tips/clues are shown below can help you know why the newly-added file is not seen or cannot be played. | |||
For videos, usually if the thumbnail of a file cannot be generated, it cannot be shown in Gallery or Video APP. | For videos, usually if the thumbnail of a file cannot be generated, it cannot be shown in Gallery or Video APP. | ||
Related | Related bugis: {{bug|942078}} <br> | ||
FxOS Media Type: [[FirefoxOS/MultimediaPlatform/MediaFormats|Media Formats]] <br> | |||
QA Test Plan: [[B2G/QA/WebAPI Test Plan/Media Playback | Media Playback Test Plan]] <br> | |||
<OL> | <OL> | ||
<LI>''' File Type Check'''<br> | <LI>''' Media File Type Check'''<br> | ||
Files are categorized in 3 groups, pictures, music, and videos @http://dxr.mozilla.org/mozilla-central/source/toolkit/content/devicestorage.properties | Files are categorized in 3 groups, pictures, music, and videos @http://dxr.mozilla.org/mozilla-central/source/toolkit/content/devicestorage.properties | ||
You need to check if your file extension is in the following list. Otherwise it will be not recognized as media files. | You need to check if your file extension is in the following list. Otherwise it will be not recognized as media files. <br> | ||
* Pictures: | * Pictures: | ||
''*.jpe; *.jpg; *.jpeg; *.gif; *.png; *.bmp'' | ''*.jpe; *.jpg; *.jpeg; *.gif; *.png; *.bmp'' | ||
* Music: | * Music: | ||
''*.mp3; *.ogg; *.m4a; *.m4b; *.m4p; *.m4r; *.3gp; *.mp4; *.m3u; *.pls; *.opus; *.amr'' | ''*.mp3; *.ogg; *.m4a; *.m4b; *.m4p; *.m4r; *.3gp; *.mp4; *.m3u; *.pls; *.opus; *.amr'' | ||
* Videos: | * Videos: | ||
''*.mp4; *.mpeg; *.mpg; *.ogv; *.ogx; *.webm; *.3gp; *.ogg; *.m4v;'' | ''*.mp4; *.mpeg; *.mpg; *.ogv; *.ogx; *.webm; *.3gp; *.ogg; *.m4v;'' | ||
<LI>'''MIME Type Get''' <br> | <LI>'''MIME Type Get''' <br> | ||
For Gaia, <br> | For Gaia, <br> | ||
| Line 30: | Line 39: | ||
There is a mime and file extension mapping list in Gaia(http://mxr.mozilla.org/gaia/source/shared/js/mime_mapper.js). Currently this is used for those media files not in storage, like mail attachment. It can be used to get file extension by passing MIME type. | There is a mime and file extension mapping list in Gaia(http://mxr.mozilla.org/gaia/source/shared/js/mime_mapper.js). Currently this is used for those media files not in storage, like mail attachment. It can be used to get file extension by passing MIME type. | ||
</OL> <br> | </OL> <br> | ||
Basically B2G does "File Type Check" first for newly-added files, and then get the MIME type via a hardcoded list from nsExternalHelperAppService.cpp to pass it to a decoder created in DecoderTraits.cpp. | Basically B2G does "File Type Check" first for newly-added files, and then get the MIME type via a hardcoded file extension- mime type mapped list from nsExternalHelperAppService.cpp to pass it to a decoder created in DecoderTraits.cpp. | ||