OLD | NEW |
---|---|
(Empty) | |
1 <!DOCTYPE html><!-- This page is a placeholder for generated extensions api doc. Note: | |
2 1) The <head> information in this page is significant, should be uniform | |
3 across api docs and should be edited only with knowledge of the | |
4 templating mechanism. | |
5 3) All <body>.innerHTML is genereated as an rendering step. If viewed in a | |
6 browser, it will be re-generated from the template, json schema and | |
7 authored overview content. | |
8 4) The <body>.innerHTML is also generated by an offline step so that this | |
9 page may easily be indexed by search engines. | |
10 --><html xmlns="http://www.w3.org/1999/xhtml"><head> | |
11 <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> | |
12 <link href="../css/print.css" rel="stylesheet" type="text/css" media="print" > | |
13 <script type="text/javascript" src="../../../../third_party/jstemplate/jstem plate_compiled.js"> | |
14 </script> | |
15 <script type="text/javascript" src="../../../../../third_party/json_minify/m inify-sans-regexp.js"> | |
16 </script> | |
17 <script type="text/javascript" src="../js/api_page_generator.js"></script> | |
18 <script type="text/javascript" src="../js/bootstrap.js"></script> | |
19 <script type="text/javascript" src="../js/sidebar.js"></script> | |
20 <meta name="description" content="Documentation for the chrome.mediaGalleries module, which is part of the Google Chrome extension APIs."><title>Media Galler ies - Google Chrome Extensions - Google Code</title></head> | |
21 <body doc-family="apps"> <link href="../css/ApiRefStyles_apps.css" rel="style sheet" type="text/css"> | |
22 <link href="../css/prettify.css" rel="stylesheet" type="text/css"> | |
23 <link href="../css/shared.css" rel="stylesheet" type="text/css"> | |
24 <div id="devModeWarning" class="displayModeWarning"> | |
25 You are viewing extension docs in chrome via the 'file:' scheme: are you exp ecting to see local changes when you refresh? You'll need run chrome with --allo w-file-access-from-files. | |
26 </div> | |
27 <div id="branchWarning" class="displayModeWarning"> | |
28 <span>WARNING: This is the <span id="branchName">BETA</span> documentation. | |
29 It may not work with the stable release of Chrome.</span> | |
30 <select id="branchChooser"> | |
31 <option>Choose a different version... | |
32 </option><option value="">Stable | |
33 </option><option value="beta">Beta | |
34 </option><option value="dev">Dev | |
35 </option><option value="trunk">Trunk | |
36 </option></select> | |
37 </div> | |
38 <div id="unofficialWarning" class="displayModeWarning"> | |
39 <span>WARNING: This is unofficial documentation. It may not work with the | |
40 current release of Chrome.</span> | |
41 <button id="goToOfficialDocs">Go to the official docs</button> | |
42 </div> | |
43 <div id="gc-container" class="labs"> | |
44 <!-- SUBTEMPLATES: DO NOT MOVE FROM THIS LOCATION --> | |
45 <!-- In particular, sub-templates that recurse, must be used by allowing | |
46 jstemplate to make a copy of the template in this section which | |
47 are not operated on by way of the jsskip="true" --> | |
48 <!-- /SUBTEMPLATES --> | |
49 <a id="top"></a> | |
50 <div id="skipto"> | |
51 <a href="#gc-pagecontent">Skip to page content</a> | |
52 <a href="#gc-toc">Skip to main navigation</a> | |
53 </div> | |
54 <!-- API HEADER --> | |
55 <table id="header" width="100%" cellspacing="0" border="0"> | |
56 <tbody><tr> | |
57 <td valign="middle"><a href="http://code.google.com/"><img src="../image s/chrome_logo.gif" alt="Google Code" style="border:0; margin:0;"></a></td> | |
58 <td valign="middle" width="100%" style="padding-left:0.6em;"> | |
59 <form action="http://www.google.com/cse" id="cse" style="margin-top:0. 5em"> | |
60 <div id="gsc-search-box"> | |
61 <input type="hidden" name="cx" value="002967670403910741006:61_cvz fqtno"> | |
62 <input type="hidden" name="ie" value="UTF-8"> | |
63 <input id="gsc-search-input" type="text" name="q" value="" size="5 5"> | |
64 <button class="gsc-search-button" type="submit" name="sa"> | |
65 <img class="gsc-search-button-lens" src="../images/search.png" a lt="Search"> | |
66 </button> | |
67 <br> | |
68 <span class="greytext">e.g. "event page" or "alarms"</span> | |
69 </div> | |
70 </form> | |
71 <script type="text/javascript" src="https://www.google.com/jsapi"></sc ript> | |
72 <script type="text/javascript">google.load("elements", "1", {packages: "transliteration"});</script> | |
73 <script type="text/javascript" src="https://www.google.com/coop/cse/t1 3n?form=cse&t13n_langs=en"></script> | |
74 <script type="text/javascript" src="https://www.google.com/coop/cse/br and?form=cse&lang=en"></script> | |
75 </td> | |
76 </tr> | |
77 </tbody></table> | |
78 <div id="codesiteContent" class=""> | |
79 <a id="gc-topnav-anchor"></a> | |
80 <div id="gc-topnav"> | |
81 <h1>Packaged Apps</h1> | |
82 <ul id="home" class="gc-topnav-tabs"> | |
83 <li id="home_link"> | |
84 <a href="about_apps.html" title="Packaged Apps home page"><span>Home </span></a> | |
85 </li> | |
86 <li id="docs_link"> | |
87 <a href="develop_apps.html" title="Packaged apps developer documenta tion"><span>Docs</span></a> | |
88 </li> | |
89 <li id="samples_link"> | |
90 <a href="https://github.com/GoogleChrome/chrome-app-samples" title=" Packaged apps samples repository"><span>Samples</span></a> | |
91 </li> | |
92 <li id="group_link"> | |
93 <a href="http://groups.google.com/a/chromium.org/group/chromium-apps " title="Google Chrome Apps developer forum"><span>Group</span></a> | |
94 </li> | |
95 <li id="so_link"> | |
96 <a href="http://stackoverflow.com/questions/tagged/google-chrome-ext ension" title="[google-chrome-extension] tag on Stack Overflow"><span>Questions? </span></a> | |
97 </li> | |
98 </ul> | |
99 </div> <!-- end gc-topnav --> | |
100 <div class="g-section g-tpl-170"> | |
101 <!-- SIDENAV --> | |
102 <div class="g-unit g-first" id="gc-toc"> | |
103 <ul> | |
104 <li><h2>Getting Started</h2> | |
105 <ul> | |
106 <li><a href="about_apps.html">What Are Packaged Apps?</a></li> | |
107 <li><a href="app_architecture.html">Understand the Architecture</a ></li> | |
108 <li><a href="first_app.html">Create Your First App</a></li> | |
109 </ul> | |
110 </li> | |
111 <li><h2>Developing</h2> | |
112 <ul> | |
113 <li><a href="develop_apps.html">Before You Start</a></li> | |
114 <li><span>The Fundamentals</span> | |
115 <ul> | |
116 <li><a href="app_lifecycle.html">Manage App Lifecycle</a></li> | |
117 <li><a href="app_storage.html">Manage Data</a></li> | |
118 <li><a href="offline_apps.html">Offline First</a></li> | |
119 <li><a href="app_external.html">Embed Content</a></li> | |
120 </ul> | |
121 </li> | |
122 <li><span>Security & Privacy</span> | |
123 <ul> | |
124 <li><a href="app_identity.html">Identify User</a></li> | |
125 <li><a href="app_csp.html">Comply with CSP</a></li> | |
126 </ul> | |
127 </li> | |
128 <li><span>Advanced Technologies</span> | |
129 <ul> | |
130 <li><a href="app_network.html">Network Communications</a></li> | |
131 <li><a href="app_hardware.html">Access Hardware Devices</a></l i> | |
132 <li><a href="app_intents.html">Connect Apps with Web Intents</ a></li> | |
133 </ul> | |
134 </li> | |
135 <li><a href="app_frameworks.html">MVC Architecture</a></li> | |
136 </ul> | |
137 </li> | |
138 <li><h2>Deploying</h2> | |
139 <ul> | |
140 <li><a href="publish_app.html">Publish</a></li> | |
141 </ul> | |
142 </li> | |
143 <li><h2>Reference</h2> | |
144 <ul> | |
145 <li><a href="manifest.html">Manifest Files</a></li> | |
146 <li><a href="api_index.html">Chrome JavaScript APIs</a></li> | |
147 <li><a href="api_other.html">Supported Libraries</a></li> | |
148 <li><a href="app_deprecated.html">Disabled Web Features</a></li> | |
149 </ul> | |
150 </li> | |
151 <li><h2><a href="https://github.com/GoogleChrome/chrome-app-samples">S amples</a></h2></li> | |
152 <li><h2><a href="app_known_issues.html">Known Issues</a></h2></li> | |
153 </ul> | |
154 </div> | |
155 <script> | |
156 initToggles(); | |
157 </script> | |
158 <div class="g-unit" id="gc-pagecontent"> | |
159 <div id="pageTitle"> | |
160 <h1 class="page_title">Media Galleries</h1> | |
161 </div> | |
162 <!-- TABLE OF CONTENTS --> | |
163 <div id="toc"> | |
164 <h2>Contents</h2> | |
165 <ol> | |
166 <li> | |
167 <a href="#manifest">Manifest</a> | |
168 <ol> | |
169 </ol> | |
170 </li> | |
171 <li> | |
172 <a href="#apiReference">API reference: chrome.mediaGalleries</a> | |
173 <ol> | |
174 <li> | |
175 <a href="#global-methods">Methods</a> | |
176 <ol> | |
177 <li> | |
178 <a href="#method-getMediaFileSystems">getMediaFileSystems</a> | |
179 </li> | |
180 </ol> | |
181 </li> | |
182 </ol> | |
183 </li> | |
184 </ol> | |
185 </div> | |
186 <!-- /TABLE OF CONTENTS --> | |
187 <!-- Standard content lead-in for experimental API pages --> | |
188 <!-- STATIC CONTENT PLACEHOLDER --> | |
189 <div id="static"><div id="pageData-name" class="pageData">Media Gallerie s</div> | |
190 <!-- BEGIN AUTHORED CONTENT --> | |
191 <p> | |
192 The media galleries API allows you to access media files (images, | |
193 video, audio) from the user's local disks (with the user's consent). | |
194 </p> | |
195 <p> | |
196 Using the API, you can prompt the user for permission to access the media | |
197 galleries. The permission dialog will contain common media locations for | |
198 the platform and will allow the user to add additional locations. From those | |
199 locations, only media files will be present in the file system objects. | |
200 </p> | |
201 <h2 id="manifest">Manifest</h2> | |
202 <p>You must declare the type of access to the media gallery you require | |
203 in your extension's manifest to use the API. Currently only the | |
204 "mediaGalleriesRead" permission is allowed. This permission does not | |
205 currently trigger an install time permission prompt because it requires | |
battre
2012/07/31 08:00:02
You cannot say "does not *currently* trigger an in
vandebo (ex-Chrome)
2012/07/31 16:43:43
Rephrased.
| |
206 the user to grant permission at runtime.</p> | |
207 <p> | |
208 You may also specify the "mediaGalleriesAllGalleries" permission to get | |
battre
2012/07/31 08:00:02
This contradicts to the statement "only the 'media
vandebo (ex-Chrome)
2012/07/31 16:43:43
Rephrased.
| |
209 access to all auto-detected media galleries on the user's computer. This | |
210 permission displays an install time prompt indicating that the extension | |
211 will have access to all of the user's media files. | |
212 </p> | |
213 <!-- END AUTHORED CONTENT --> | |
214 </div> | |
215 <!-- API PAGE --> | |
216 <div class="apiPage"> | |
217 <a name="apiReference"></a> | |
218 <h2>API reference: chrome.mediaGalleries</h2> | |
219 <!-- PROPERTIES --> | |
220 <!-- /apiGroup --> | |
221 <!-- METHODS --> | |
222 <div id="methodsTemplate" class="apiGroup"> | |
223 <a name="global-methods"></a> | |
224 <h3>Methods</h3> | |
225 <!-- iterates over all functions --> | |
226 <div class="apiItem"> | |
227 <a name="method-getMediaFileSystems"></a> <!-- method-anchor --> | |
228 <h4>getMediaFileSystems</h4> | |
229 <div class="summary"> | |
230 <!-- Note: intentionally longer 80 columns --> | |
231 <span>chrome.mediaGalleries.getMediaFileSystems</span>(<span c lass="optional"><span>object</span> | |
232 <var><span>details</span></var></span><span class="null">< span>, </span><span>function</span> | |
233 <var><span>MediaFileSystemsCallback</span></var></span>)</ div> | |
234 <div class="description"> | |
235 <p>Get the media galleries configured in this user agent. If non e are configured or available, the callback will receive an empty array.</p> | |
236 <!-- PARAMETERS --> | |
237 <h4>Parameters</h4> | |
238 <dl> | |
239 <div> | |
240 <div> | |
241 <dt> | |
242 <var>details</var> | |
243 <em> | |
244 <!-- TYPE --> | |
245 <div style="display:inline"> | |
246 ( | |
247 <span class="optional">optional</span> | |
248 <span id="typeTemplate"> | |
249 <span> | |
250 <span>object</span> | |
251 </span> | |
252 </span> | |
253 ) | |
254 </div> | |
255 </em> | |
256 </dt> | |
257 <dd class="todo"> | |
258 Undocumented. | |
259 </dd> | |
260 <!-- OBJECT PROPERTIES --> | |
261 <dd> | |
262 <dl> | |
263 <div> | |
264 <div> | |
265 <dt> | |
266 <var>interactive</var> | |
267 <em> | |
268 <!-- TYPE --> | |
269 <div style="display:inline"> | |
270 ( | |
271 <span class="optional">optional</span> | |
272 <span class="enum">enumerated</span> | |
273 <span id="typeTemplate"> | |
274 <span> | |
275 <span>string</span> | |
276 <span>["no", "yes", "if_needed"]</span> | |
277 </span> | |
278 </span> | |
279 ) | |
280 </div> | |
281 </em> | |
282 </dt> | |
283 <dd>Whether to prompt the user for permission to additional media gall eries before returning the permitted set. Default is silent. If the value 'yes' is passed, or if the application has not been granted access to any media galle ries and the value 'if_needed' is passed, then the media gallery configuration d ialog will be displayed.</dd> | |
284 <!-- OBJECT PROPERTIES --> | |
285 <!-- OBJECT METHODS --> | |
286 <!-- OBJECT EVENT FIELDS --> | |
287 <!-- FUNCTION PARAMETERS --> | |
288 </div> | |
289 </div> | |
290 </dl> | |
291 </dd> | |
292 <!-- OBJECT METHODS --> | |
293 <!-- OBJECT EVENT FIELDS --> | |
294 <!-- FUNCTION PARAMETERS --> | |
295 </div> | |
296 </div><div> | |
297 <div> | |
298 <dt> | |
299 <var>MediaFileSystemsCallback</var> | |
300 <em> | |
301 <!-- TYPE --> | |
302 <div style="display:inline"> | |
303 ( | |
304 <span id="typeTemplate"> | |
305 <span> | |
306 <span>function</span> | |
307 </span> | |
308 </span> | |
309 ) | |
310 </div> | |
311 </em> | |
312 </dt> | |
313 <dd class="todo"> | |
314 Undocumented. | |
315 </dd> | |
316 <!-- OBJECT PROPERTIES --> | |
317 <!-- OBJECT METHODS --> | |
318 <!-- OBJECT EVENT FIELDS --> | |
319 <!-- FUNCTION PARAMETERS --> | |
320 <dd> | |
321 <div> | |
322 <h5>Parameters</h5> | |
323 <dl> | |
324 <div> | |
325 <div> | |
326 <dt> | |
327 <var>mediaFileSystems</var> | |
328 <em> | |
329 <!-- TYPE --> | |
330 <div style="display:inline"> | |
331 ( | |
332 <span class="optional">optional</span> | |
333 <span id="typeTemplate"> | |
334 <span> | |
335 <span> | |
336 array of <span><span> | |
337 <span> | |
338 <span>LocalFileSystem</span> | |
battre
2012/07/31 08:00:02
Why is this no link? What is a LocalFileSystem obj
vandebo (ex-Chrome)
2012/07/31 16:43:43
It's not an extension object. It refers to http:/
| |
339 </span> | |
340 </span></span> | |
341 </span> | |
342 </span> | |
343 </span> | |
344 ) | |
345 </div> | |
346 </em> | |
347 </dt> | |
348 <dd class="todo"> | |
349 Undocumented. | |
350 </dd> | |
351 <!-- OBJECT PROPERTIES --> | |
352 <!-- OBJECT METHODS --> | |
353 <!-- OBJECT EVENT FIELDS --> | |
354 <!-- FUNCTION PARAMETERS --> | |
355 </div> | |
356 </div> | |
357 </dl> | |
358 </div> | |
359 </dd> | |
360 </div> | |
361 </div> | |
362 </dl> | |
363 <!-- RETURNS --> | |
364 <dl> | |
365 </dl> | |
366 <!-- CALLBACK --> | |
367 <!-- MIN_VERSION --> | |
368 </div> <!-- /description --> | |
369 </div> <!-- /apiItem --> | |
370 </div> <!-- /apiGroup --> | |
371 <!-- EVENTS --> | |
372 <!-- /apiGroup --> | |
373 <!-- TYPES --> | |
374 <!-- /apiGroup --> | |
375 </div> <!-- /apiPage --> | |
376 </div> <!-- /gc-pagecontent --> | |
377 </div> <!-- /g-section --> | |
378 </div> <!-- /codesiteContent --> | |
379 <div id="gc-footer" --=""> | |
380 <div class="text"> | |
381 <p> | |
382 Except as otherwise <a href="http://code.google.com/policies.html#restrictions ">noted</a>, | |
383 the content of this page is licensed under the <a rel="license" href="http://c reativecommons.org/licenses/by/3.0/">Creative Commons | |
384 Attribution 3.0 License</a>, and code samples are licensed under the | |
385 <a rel="license" href="http://code.google.com/google_bsd_license.html">BSD Lic ense</a>. | |
386 </p> | |
387 <p> | |
388 ©2012 Google | |
389 </p> | |
390 <!-- begin analytics --> | |
391 <script src="https://www.google-analytics.com/urchin.js" type="text/javascript"> </script> | |
392 <script src="https://www.google-analytics.com/ga.js" type="text/javascript"></sc ript> | |
393 <script src="../js/prettify.js" type="text/javascript"></script> | |
394 <script> | |
395 // Auto syntax highlight all pre tags. | |
396 var pres = document.querySelectorAll('pre'); | |
397 for (var i = 0, pre; pre = pres[i]; ++i) { | |
398 pre.className += ' prettyprint'; | |
399 }; | |
400 prettyPrint(); | |
401 </script> | |
402 <script type="text/javascript"> | |
403 // chrome doc tracking | |
404 try { | |
405 var engdocs = _gat._getTracker("YT-10763712-2"); | |
406 engdocs._trackPageview(); | |
407 } catch(err) {} | |
408 // code.google.com site-wide tracking | |
409 try { | |
410 _uacct="UA-18071-1"; | |
411 _uanchor=1; | |
412 _uff=0; | |
413 urchinTracker(); | |
414 } | |
415 catch(e) {/* urchinTracker not available. */} | |
416 </script> | |
417 <!-- end analytics --> | |
418 </div> | |
419 </div> <!-- /gc-footer --> | |
420 </div> <!-- /gc-container --> | |
421 </body></html> | |
OLD | NEW |