| OLD | NEW |
| 1 <p> | 1 <table class="intro"> |
| 2 The media galleries API allows you to access media files (images, | 2 <tr> |
| 3 video, audio) from the user's local disks (with the user's consent). | 3 <th scope="col"></th> |
| 4 </p> | 4 <th scope="col"></th> |
| 5 </tr> |
| 6 <tr> |
| 7 <td><strong>Description:</strong></td> |
| 8 <td>Use the <code>chrome.mediaGalleries</code> API |
| 9 to access media files (images, video, audio) |
| 10 from the user's local disks (with the user's consent).</td> |
| 11 </tr> |
| 12 <tr> |
| 13 <td><strong>Availability:</strong></td> |
| 14 <td>Google Chrome 23</td> |
| 15 </tr> |
| 16 <tr> |
| 17 <td><strong>Permissions:</strong></td> |
| 18 <td><code>"mediaGalleries": ["read"]</code>, |
| 19 <code>"mediaGalleries": ["read", "allAutoDetected"]</code><br> |
| 20 See <a href="#manifest">Manifest</a> below |
| 21 for more information.</td> |
| 22 </tr> |
| 23 <tr> |
| 24 <td><strong>Learn more:</strong></td> |
| 25 <td><a href="https://developers.google.com/live/shows/10479832/">Chrome Offi
ce Hours: The Media Galleries API</a></td> |
| 26 </tr> |
| 27 </table> |
| 28 |
| 29 <h2 id="usage">Usage</h2> |
| 5 | 30 |
| 6 <p> | 31 <p> |
| 7 Using the API, you can prompt the user for permission to access the media | 32 Using the API, you can prompt the user for permission to access the media |
| 8 galleries. The permission dialog will contain common media locations for | 33 galleries. The permission dialog will contain common media locations for |
| 9 the platform and will allow the user to add additional locations. From those | 34 the platform and will allow the user to add additional locations. From those |
| 10 locations, only media files will be present in the file system objects. | 35 locations, only media files will be present in the file system objects. |
| 11 </p> | 36 </p> |
| 12 | 37 |
| 13 <h2 id="manifest">Manifest</h2> | 38 <h2 id="manifest">Manifest</h2> |
| 14 <p>The media galleries API has two axes of permission parameters; the locations | 39 <p>The media galleries API has two axes of permission parameters; the locations |
| (...skipping 26 matching lines...) Expand all Loading... |
| 41 }</pre> | 66 }</pre> |
| 42 | 67 |
| 43 <p>This permission will trigger an install time permission prompt | 68 <p>This permission will trigger an install time permission prompt |
| 44 and let the extension read from all auto-detected media galleries on the | 69 and let the extension read from all auto-detected media galleries on the |
| 45 user's computer. The user may add or remove galleries using the | 70 user's computer. The user may add or remove galleries using the |
| 46 media gallery management dialog, after which the extension will be able | 71 media gallery management dialog, after which the extension will be able |
| 47 to read all the media files from galleries that the user has selected.</p> | 72 to read all the media files from galleries that the user has selected.</p> |
| 48 | 73 |
| 49 <p>Currently "read" is the only access type supported by | 74 <p>Currently "read" is the only access type supported by |
| 50 this API. Read-write and add-file access with be implemented soon.</p> | 75 this API. Read-write and add-file access with be implemented soon.</p> |
| OLD | NEW |