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 36 * 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-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.
(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-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.
(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.
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close