| OLD | NEW |
| 1 <table class="intro"> | |
| 2 <tr> | |
| 3 <th scope="col"></th> | |
| 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 (read permission)</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> | 1 <h2 id="usage">Usage</h2> |
| 30 | 2 |
| 31 <p> | 3 <p> |
| 32 Using the API, you can prompt the user for permission to access the media | 4 Using the API, you can prompt the user for permission to access the media |
| 33 galleries. The permission dialog will contain common media locations for | 5 galleries. The permission dialog will contain common media locations for |
| 34 the platform and will allow the user to add additional locations. From those | 6 the platform and will allow the user to add additional locations. From those |
| 35 locations, only media files will be present in the file system objects. | 7 locations, only media files will be present in the file system objects. |
| 36 </p> | 8 </p> |
| 37 | 9 |
| 38 <h2 id="manifest">Manifest</h2> | 10 <h2 id="manifest">Manifest</h2> |
| (...skipping 27 matching lines...) Expand all Loading... |
| 66 }</pre> | 38 }</pre> |
| 67 | 39 |
| 68 <p>This permission will trigger an install time permission prompt | 40 <p>This permission will trigger an install time permission prompt |
| 69 and let the app read from all auto-detected media galleries on the | 41 and let the app read from all auto-detected media galleries on the |
| 70 user's computer. The user may add or remove galleries using the | 42 user's computer. The user may add or remove galleries using the |
| 71 media gallery management dialog, after which the app will be able | 43 media gallery management dialog, after which the app will be able |
| 72 to read all the media files from galleries that the user has selected.</p> | 44 to read all the media files from galleries that the user has selected.</p> |
| 73 | 45 |
| 74 <p>Currently "read" is the only access type supported by | 46 <p>Currently "read" is the only access type supported by |
| 75 this API. Read-write and add-file access with be implemented soon.</p> | 47 this API. Read-write and add-file access with be implemented soon.</p> |
| OLD | NEW |