Use the chrome.mediaGalleries API to access media files (audio, images, video) from the user's local disks (with the user's consent).
Use the chrome.mediaGalleries API to access media files (audio, images, video) from the user's local disks (with the user's consent). * available since Chrome 35 * https://developer.chrome.com/apps/mediaGalleries
(add-gallery-watch gallery-id)
Adds a gallery watch for the gallery with the specified gallery ID. The given callback is then fired with a success or failure result.
|gallery-id| - https://developer.chrome.com/apps/mediaGalleries#property-addGalleryWatch-galleryId.
This function returns a core.async channel of type promise-chan
which eventually receives a result value.
Signature of the result value put on the channel is [result] where:
|result| - https://developer.chrome.com/apps/mediaGalleries#property-callback-result.
In case of an error the channel closes without receiving any value and relevant error object can be obtained via chromex.error/get-last-error.
https://developer.chrome.com/apps/mediaGalleries#method-addGalleryWatch.
Adds a gallery watch for the gallery with the specified gallery ID. The given callback is then fired with a success or failure result. |gallery-id| - https://developer.chrome.com/apps/mediaGalleries#property-addGalleryWatch-galleryId. This function returns a core.async channel of type `promise-chan` which eventually receives a result value. Signature of the result value put on the channel is [result] where: |result| - https://developer.chrome.com/apps/mediaGalleries#property-callback-result. In case of an error the channel closes without receiving any value and relevant error object can be obtained via chromex.error/get-last-error. https://developer.chrome.com/apps/mediaGalleries#method-addGalleryWatch.
(add-scan-results)
Show the user the scan results and let them add any or all of them as galleries. This should be used after the 'finish' onScanProgress() event has happened. All galleries the app has access to are returned, not just the newly added galleries.
This function returns a core.async channel of type promise-chan
which eventually receives a result value.
Signature of the result value put on the channel is [media-file-systems] where:
|media-file-systems| - https://developer.chrome.com/apps/mediaGalleries#property-callback-mediaFileSystems.
In case of an error the channel closes without receiving any value and relevant error object can be obtained via chromex.error/get-last-error.
https://developer.chrome.com/apps/mediaGalleries#method-addScanResults.
Show the user the scan results and let them add any or all of them as galleries. This should be used after the 'finish' onScanProgress() event has happened. All galleries the app has access to are returned, not just the newly added galleries. This function returns a core.async channel of type `promise-chan` which eventually receives a result value. Signature of the result value put on the channel is [media-file-systems] where: |media-file-systems| - https://developer.chrome.com/apps/mediaGalleries#property-callback-mediaFileSystems. In case of an error the channel closes without receiving any value and relevant error object can be obtained via chromex.error/get-last-error. https://developer.chrome.com/apps/mediaGalleries#method-addScanResults.
(add-user-selected-folder)
Present a directory picker to the user and add the selected directory as a gallery. If the user cancels the picker, selectedFileSystemName will be empty. A user gesture is required for the dialog to display. Without a user gesture, the callback will run as though the user canceled.
This function returns a core.async channel of type promise-chan
which eventually receives a result value.
Signature of the result value put on the channel is [media-file-systems selected-file-system-name] where:
|media-file-systems| - https://developer.chrome.com/apps/mediaGalleries#property-callback-mediaFileSystems. |selected-file-system-name| - https://developer.chrome.com/apps/mediaGalleries#property-callback-selectedFileSystemName.
In case of an error the channel closes without receiving any value and relevant error object can be obtained via chromex.error/get-last-error.
https://developer.chrome.com/apps/mediaGalleries#method-addUserSelectedFolder.
Present a directory picker to the user and add the selected directory as a gallery. If the user cancels the picker, selectedFileSystemName will be empty. A user gesture is required for the dialog to display. Without a user gesture, the callback will run as though the user canceled. This function returns a core.async channel of type `promise-chan` which eventually receives a result value. Signature of the result value put on the channel is [media-file-systems selected-file-system-name] where: |media-file-systems| - https://developer.chrome.com/apps/mediaGalleries#property-callback-mediaFileSystems. |selected-file-system-name| - https://developer.chrome.com/apps/mediaGalleries#property-callback-selectedFileSystemName. In case of an error the channel closes without receiving any value and relevant error object can be obtained via chromex.error/get-last-error. https://developer.chrome.com/apps/mediaGalleries#method-addUserSelectedFolder.
(cancel-media-scan)
Cancel any pending media scan. Well behaved apps should provide a way for the user to cancel scans they start.
https://developer.chrome.com/apps/mediaGalleries#method-cancelMediaScan.
Cancel any pending media scan. Well behaved apps should provide a way for the user to cancel scans they start. https://developer.chrome.com/apps/mediaGalleries#method-cancelMediaScan.
(drop-permission-for-media-file-system gallery-id)
Give up access to a given media gallery.
|gallery-id| - https://developer.chrome.com/apps/mediaGalleries#property-dropPermissionForMediaFileSystem-galleryId.
This function returns a core.async channel of type promise-chan
which eventually receives a result value.
Signature of the result value put on the channel is [].
In case of an error the channel closes without receiving any value and relevant error object can be obtained via chromex.error/get-last-error.
https://developer.chrome.com/apps/mediaGalleries#method-dropPermissionForMediaFileSystem.
Give up access to a given media gallery. |gallery-id| - https://developer.chrome.com/apps/mediaGalleries#property-dropPermissionForMediaFileSystem-galleryId. This function returns a core.async channel of type `promise-chan` which eventually receives a result value. Signature of the result value put on the channel is []. In case of an error the channel closes without receiving any value and relevant error object can be obtained via chromex.error/get-last-error. https://developer.chrome.com/apps/mediaGalleries#method-dropPermissionForMediaFileSystem.
(drop-permission-for-media-file-system* config gallery-id)
(get-all-gallery-watch)
Notifies which galleries are being watched via the given callback.
This function returns a core.async channel of type promise-chan
which eventually receives a result value.
Signature of the result value put on the channel is [gallery-ids] where:
|gallery-ids| - https://developer.chrome.com/apps/mediaGalleries#property-callback-galleryIds.
In case of an error the channel closes without receiving any value and relevant error object can be obtained via chromex.error/get-last-error.
https://developer.chrome.com/apps/mediaGalleries#method-getAllGalleryWatch.
Notifies which galleries are being watched via the given callback. This function returns a core.async channel of type `promise-chan` which eventually receives a result value. Signature of the result value put on the channel is [gallery-ids] where: |gallery-ids| - https://developer.chrome.com/apps/mediaGalleries#property-callback-galleryIds. In case of an error the channel closes without receiving any value and relevant error object can be obtained via chromex.error/get-last-error. https://developer.chrome.com/apps/mediaGalleries#method-getAllGalleryWatch.
(get-all-media-file-system-metadata)
Get metadata for all available media galleries.
This function returns a core.async channel of type promise-chan
which eventually receives a result value.
Signature of the result value put on the channel is [metadata] where:
|metadata| - https://developer.chrome.com/apps/mediaGalleries#property-callback-metadata.
In case of an error the channel closes without receiving any value and relevant error object can be obtained via chromex.error/get-last-error.
https://developer.chrome.com/apps/mediaGalleries#method-getAllMediaFileSystemMetadata.
Get metadata for all available media galleries. This function returns a core.async channel of type `promise-chan` which eventually receives a result value. Signature of the result value put on the channel is [metadata] where: |metadata| - https://developer.chrome.com/apps/mediaGalleries#property-callback-metadata. In case of an error the channel closes without receiving any value and relevant error object can be obtained via chromex.error/get-last-error. https://developer.chrome.com/apps/mediaGalleries#method-getAllMediaFileSystemMetadata.
(get-media-file-system-metadata media-file-system)
Get metadata about a specific media file system.
|media-file-system| - https://developer.chrome.com/apps/mediaGalleries#property-getMediaFileSystemMetadata-mediaFileSystem.
https://developer.chrome.com/apps/mediaGalleries#method-getMediaFileSystemMetadata.
Get metadata about a specific media file system. |media-file-system| - https://developer.chrome.com/apps/mediaGalleries#property-getMediaFileSystemMetadata-mediaFileSystem. https://developer.chrome.com/apps/mediaGalleries#method-getMediaFileSystemMetadata.
(get-media-file-systems)
(get-media-file-systems details)
Get the media galleries configured in this user agent. If none are configured or available, the callback will receive an empty array.
|details| - https://developer.chrome.com/apps/mediaGalleries#property-getMediaFileSystems-details.
This function returns a core.async channel of type promise-chan
which eventually receives a result value.
Signature of the result value put on the channel is [media-file-systems] where:
|media-file-systems| - https://developer.chrome.com/apps/mediaGalleries#property-callback-mediaFileSystems.
In case of an error the channel closes without receiving any value and relevant error object can be obtained via chromex.error/get-last-error.
https://developer.chrome.com/apps/mediaGalleries#method-getMediaFileSystems.
Get the media galleries configured in this user agent. If none are configured or available, the callback will receive an empty array. |details| - https://developer.chrome.com/apps/mediaGalleries#property-getMediaFileSystems-details. This function returns a core.async channel of type `promise-chan` which eventually receives a result value. Signature of the result value put on the channel is [media-file-systems] where: |media-file-systems| - https://developer.chrome.com/apps/mediaGalleries#property-callback-mediaFileSystems. In case of an error the channel closes without receiving any value and relevant error object can be obtained via chromex.error/get-last-error. https://developer.chrome.com/apps/mediaGalleries#method-getMediaFileSystems.
(get-metadata media-file)
(get-metadata media-file options)
Gets the media-specific metadata for a media file. This should work for files in media galleries as well as other DOM filesystems.
|media-file| - https://developer.chrome.com/apps/mediaGalleries#property-getMetadata-mediaFile. |options| - https://developer.chrome.com/apps/mediaGalleries#property-getMetadata-options.
This function returns a core.async channel of type promise-chan
which eventually receives a result value.
Signature of the result value put on the channel is [metadata] where:
|metadata| - https://developer.chrome.com/apps/mediaGalleries#property-callback-metadata.
In case of an error the channel closes without receiving any value and relevant error object can be obtained via chromex.error/get-last-error.
https://developer.chrome.com/apps/mediaGalleries#method-getMetadata.
Gets the media-specific metadata for a media file. This should work for files in media galleries as well as other DOM filesystems. |media-file| - https://developer.chrome.com/apps/mediaGalleries#property-getMetadata-mediaFile. |options| - https://developer.chrome.com/apps/mediaGalleries#property-getMetadata-options. This function returns a core.async channel of type `promise-chan` which eventually receives a result value. Signature of the result value put on the channel is [metadata] where: |metadata| - https://developer.chrome.com/apps/mediaGalleries#property-callback-metadata. In case of an error the channel closes without receiving any value and relevant error object can be obtained via chromex.error/get-last-error. https://developer.chrome.com/apps/mediaGalleries#method-getMetadata.
(remove-all-gallery-watch)
Removes all gallery watches.
https://developer.chrome.com/apps/mediaGalleries#method-removeAllGalleryWatch.
Removes all gallery watches. https://developer.chrome.com/apps/mediaGalleries#method-removeAllGalleryWatch.
(remove-gallery-watch gallery-id)
Removes a gallery watch for the gallery with the specified gallery ID.
|gallery-id| - https://developer.chrome.com/apps/mediaGalleries#property-removeGalleryWatch-galleryId.
https://developer.chrome.com/apps/mediaGalleries#method-removeGalleryWatch.
Removes a gallery watch for the gallery with the specified gallery ID. |gallery-id| - https://developer.chrome.com/apps/mediaGalleries#property-removeGalleryWatch-galleryId. https://developer.chrome.com/apps/mediaGalleries#method-removeGalleryWatch.
(start-media-scan)
Start a scan of the user's hard disks for directories containing media. The scan may take a long time so progress and completion is communicated by events. No permission is granted as a result of the scan, see addScanResults.
https://developer.chrome.com/apps/mediaGalleries#method-startMediaScan.
Start a scan of the user's hard disks for directories containing media. The scan may take a long time so progress and completion is communicated by events. No permission is granted as a result of the scan, see addScanResults. https://developer.chrome.com/apps/mediaGalleries#method-startMediaScan.
(tap-all-events chan)
Taps all valid non-deprecated events in chromex.app.media-galleries namespace.
Taps all valid non-deprecated events in chromex.app.media-galleries namespace.
(tap-on-gallery-changed-events channel & args)
Fired when a media gallery is changed or a gallery watch is dropped.
Events will be put on the |channel| with signature [::on-gallery-changed [details]] where:
|details| - https://developer.chrome.com/apps/mediaGalleries#property-onGalleryChanged-details.
Note: |args| will be passed as additional parameters into Chrome event's .addListener call.
https://developer.chrome.com/apps/mediaGalleries#event-onGalleryChanged.
Fired when a media gallery is changed or a gallery watch is dropped. Events will be put on the |channel| with signature [::on-gallery-changed [details]] where: |details| - https://developer.chrome.com/apps/mediaGalleries#property-onGalleryChanged-details. Note: |args| will be passed as additional parameters into Chrome event's .addListener call. https://developer.chrome.com/apps/mediaGalleries#event-onGalleryChanged.
(tap-on-scan-progress-events channel & args)
The pending media scan has changed state. See details for more information.
Events will be put on the |channel| with signature [::on-scan-progress [details]] where:
|details| - https://developer.chrome.com/apps/mediaGalleries#property-onScanProgress-details.
Note: |args| will be passed as additional parameters into Chrome event's .addListener call.
https://developer.chrome.com/apps/mediaGalleries#event-onScanProgress.
The pending media scan has changed state. See details for more information. Events will be put on the |channel| with signature [::on-scan-progress [details]] where: |details| - https://developer.chrome.com/apps/mediaGalleries#property-onScanProgress-details. Note: |args| will be passed as additional parameters into Chrome event's .addListener call. https://developer.chrome.com/apps/mediaGalleries#event-onScanProgress.
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close