OLD | NEW |
---|---|
1 <h2 id="usage">Usage</h2> | 1 <h2 id="usage">Usage</h2> |
2 | 2 |
3 <p>The mediaGalleries API lets you prompt the user for permission to access | 3 <p>The mediaGalleries API lets you prompt the user for permission to access |
4 media galleries on the user's computer. The permission dialog contains common | 4 media galleries on the user's computer. The permission dialog contains common |
5 media locations for the platform and allows the user to specify additional | 5 media locations for the platform and allows the user to specify additional |
6 locations. From those locations, only media files will be present in the file | 6 locations. From those locations, only media files will be present in the file |
7 system objects.</p> | 7 system objects.</p> |
8 | 8 |
9 <h2 id="manifest">Manifest</h2> | 9 <h2 id="manifest">Manifest</h2> |
10 | 10 |
(...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
103 <p>This example manifest file will trigger an install-time permission prompt, | 103 <p>This example manifest file will trigger an install-time permission prompt, |
104 and let the app read from all auto-detected media galleries on the | 104 and let the app read from all auto-detected media galleries on the |
105 user's computer. The user may add or remove galleries using the | 105 user's computer. The user may add or remove galleries using the |
106 media gallery permission dialog, after which the app will be able | 106 media gallery permission dialog, after which the app will be able |
107 to read all the media files from galleries that the user selected.</p> | 107 to read all the media files from galleries that the user selected.</p> |
108 | 108 |
109 <h2 id="iTunes">iTunes</h2> | 109 <h2 id="iTunes">iTunes</h2> |
110 | 110 |
111 <p>If present, the user's iTunes library can be accessed as a media gallery. | 111 <p>If present, the user's iTunes library can be accessed as a media gallery. |
112 In addition to the media files in the library, the "iTunes Music Library.xml" | 112 In addition to the media files in the library, the "iTunes Music Library.xml" |
113 file is also presented. Regardless of where the music files are actually on the | 113 file is also presented.</p> |
114 disk (and where the xml file says they are), they are mapping into an | 114 <p>Regardless of where the music files are actually on the disk (and where |
115 Artist/Album/Track hierarchy like iTunes does by default. This mapping doesn't | 115 the xml file says they are), they are mapped into an Artist/Album/Track |
116 always work perfectly, so there are two things to note for Apps trying to match | 116 hierarchy like iTunes does by default. This mapping doesn't always work |
117 the xml file with files in the gallery. If the filenames for tracks within an | 117 perfectly, so there are two things to note for Apps trying to match the |
118 album are not unique, they will be uniquified by adding the track id in | 118 xml file with files in the gallery.</p> |
119 parentheses before the extension, and if there is a colon or a slash in the | 119 <p>If the filenames for tracks within an album are not unique, they will be |
120 artist, album, or track name, they are turned into underscore characters.</p> | 120 uniquified by adding the track id in parentheses before the extension, and |
121 if there is a colon or a slash in the artist, album, or track name, they are | |
122 turned into underscore characters.</p> | |
121 | 123 |
122 <h2 id="Picasa">Picasa</h2> | 124 <h2 id="Picasa">Picasa</h2> |
123 | 125 |
124 <p>If present, the user's Picasa library can also be accessed as a media | 126 <p>If present, the user's Picasa library can also be accessed as a media |
125 gallery. Directories on the filesystem scanned by Picasa are presented under | 127 gallery. Directories on the filesystem scanned by Picasa are presented under |
126 folders/. Picasa Albums are presented under albums/. Albums and Folders that | 128 folders/. Picasa Albums are presented under albums/.</p> |
127 have duplicate names and dates will be uniquified using an incrementing | 129 <p>Albums and Folders that have duplicate names and dates will be uniquified |
128 integer in parenthesis before the extension. Duplicate filenames within the | 130 using an incrementing integer in parenthesis before the extension.</p> |
129 same Album will also be uniquified using an incrementing integer in parenthesis | 131 <p>Duplicate filenames within the same Album will also be uniquified using an |
130 before the extension.</p> | 132 incrementing integer in parenthesis before the extension.</p> |
133 | |
134 <h2 id="iPhoto">iPhoto</h2> | |
135 | |
136 <p>If present, the user's iPhoto library can be accessed as a media gallery. | |
137 The files are structured within a subdirectory called "Albums/". Within that | |
138 subdirectory, each album in the user's iPhoto library will appear as a | |
139 subdirectory by name, and contain file entries for the photos in that album. | |
140 </p> | |
141 <p>Duplicate album names or image filenames with albums will get a | |
vandebo (ex-Chrome)
2014/03/28 20:52:46
with -> within ?
| |
142 disambiguating suffix like "(NN)" where NN is a unique number.</p> | |
143 <p>Any items appearing in multiple albums in iPhoto will appear in all those | |
144 albums in the gallery.</p> | |
145 <p>If the user has modified any images within an album, there will be an | |
146 additional subdirectory called "originals/" within the album directory, which | |
147 will then contain the original image, which will have the same filename as | |
148 the file in the album itself. The file as it appears in the album directory, | |
149 though, will be the one the user has invested time cropping, rotating, or | |
150 otherwise editing.</p> | |
151 | |
OLD | NEW |