Liking cljdoc? Tell your friends :D

chromex.app.media-galleries

clj

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 27
  * https://developer.chrome.com/apps/mediaGalleries
raw docstring

(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.
sourceraw docstring

(add-gallery-watch* config gallery-id)
source

add-scan-resultsclj/smacro

(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.
sourceraw docstring

add-scan-results*cljs

(add-scan-results* config)
source

add-user-selected-folderclj/smacro

(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.
sourceraw docstring

add-user-selected-folder*cljs

(add-user-selected-folder* config)
source

api-tableclj

source

cancel-media-scanclj/smacro

(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.
sourceraw docstring

cancel-media-scan*cljs

(cancel-media-scan* config)
source

drop-permission-for-media-file-systemclj/smacro

(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.
sourceraw docstring

drop-permission-for-media-file-system*cljs

(drop-permission-for-media-file-system* config gallery-id)
source

gen-callclj

source

gen-wrapclj/smacro

(gen-wrap kind item-id config & args)
source

(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.
sourceraw docstring

(get-all-gallery-watch* config)
source

get-all-media-file-system-metadataclj/smacro

(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.
sourceraw docstring

get-all-media-file-system-metadata*cljs

(get-all-media-file-system-metadata* config)
source

get-media-file-system-metadataclj/smacro

(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.
sourceraw docstring

get-media-file-system-metadata*cljs

(get-media-file-system-metadata* config media-file-system)
source

get-media-file-systemsclj/smacro

(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.
sourceraw docstring

get-media-file-systems*cljs

(get-media-file-systems* config details)
source

get-metadataclj/smacro

(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.
sourceraw docstring

get-metadata*cljs

(get-metadata* config media-file options)
source

(on-gallery-changed* config channel & args)
source

on-scan-progress*cljs

(on-scan-progress* config channel & args)
source

(remove-all-gallery-watch)
Removes all gallery watches.

https://developer.chrome.com/apps/mediaGalleries#method-removeAllGalleryWatch.
sourceraw docstring

(remove-all-gallery-watch* config)
source

(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.
sourceraw docstring

(remove-gallery-watch* config gallery-id)
source

start-media-scanclj/smacro

(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.
sourceraw docstring

start-media-scan*cljs

(start-media-scan* config)
source

tap-all-eventsclj/smacro

(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.
sourceraw docstring

(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.
sourceraw docstring

tap-on-scan-progress-eventsclj/smacro

(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.
sourceraw docstring

cljdoc is a website building & hosting documentation for Clojure/Script libraries

× close