| OLD | NEW |
| 1 <div id="pageData-name" class="pageData">Media Galleries</div> | |
| 2 | |
| 3 <!-- BEGIN AUTHORED CONTENT --> | |
| 4 <p> | 1 <p> |
| 5 The media galleries API allows you to access media files (images, | 2 The media galleries API allows you to access media files (images, |
| 6 video, audio) from the user's local disks (with the user's consent). | 3 video, audio) from the user's local disks (with the user's consent). |
| 7 </p> | 4 </p> |
| 8 | 5 |
| 9 <p> | 6 <p> |
| 10 Using the API, you can prompt the user for permission to access the media | 7 Using the API, you can prompt the user for permission to access the media |
| 11 galleries. The permission dialog will contain common media locations for | 8 galleries. The permission dialog will contain common media locations for |
| 12 the platform and will allow the user to add additional locations. From those | 9 the platform and will allow the user to add additional locations. From those |
| 13 locations, only media files will be present in the file system objects. | 10 locations, only media files will be present in the file system objects. |
| 14 </P> | 11 </p> |
| 15 | 12 |
| 16 <h2 id="manifest">Manifest</h2> | 13 <h2 id="manifest">Manifest</h2> |
| 17 <p>The media galleries API has two axes of permissions; the locations that | 14 <p>The media galleries API has two axes of permissions; the locations that |
| 18 can be accessed, and the type of access (read-only, read-write, add-files).</p> | 15 can be accessed, and the type of access (read-only, read-write, add-files).</p> |
| 19 | 16 |
| 20 <p>On the location axis, specifying no location-type permission means that | 17 <p>On the location axis, specifying no location-type permission means that |
| 21 no media galleries are accessible until the user grants permission to | 18 no media galleries are accessible until the user grants permission to |
| 22 specific media galleries at runtime using the media gallery configuration | 19 specific media galleries at runtime using the media gallery configuration |
| 23 dialog. This dialog can be programmatically triggered. Alternatively, | 20 dialog. This dialog can be programmatically triggered. Alternatively, |
| 24 specifying the "mediaGalleriesAllGalleries" permission grants access to all | 21 specifying the "mediaGalleriesAllGalleries" permission grants access to all |
| (...skipping 17 matching lines...) Expand all Loading... |
| 42 ... | 39 ... |
| 43 }</pre> | 40 }</pre> |
| 44 | 41 |
| 45 <p>This set of permissions will trigger an install time permission prompt | 42 <p>This set of permissions will trigger an install time permission prompt |
| 46 and let the extension read from all auto-detected media galleries on the | 43 and let the extension read from all auto-detected media galleries on the |
| 47 user's computer. The user may add or remove galleries using the | 44 user's computer. The user may add or remove galleries using the |
| 48 media gallery management dialog, after which the extension will be able | 45 media gallery management dialog, after which the extension will be able |
| 49 to read all the media files from galleries that the user has selected.</p> | 46 to read all the media files from galleries that the user has selected.</p> |
| 50 | 47 |
| 51 <p>Currently "mediaGalleriesRead" is the only access type supported by | 48 <p>Currently "mediaGalleriesRead" is the only access type supported by |
| 52 this API. Read-write and add-file access with be implemented soon.</p> | 49 this API. Read-write and add-file access with be implemented soon.</p> |
| 53 | |
| 54 <!-- END AUTHORED CONTENT --> | |
| OLD | NEW |