// images, video) from the user's local disks (with the user's consent).
namespace mediaGalleries {
+ [inline_doc] enum GalleryChangeType {
+ // The contents of the gallery have changed.
+ contents_changed,
+ // The watch has been dropped because the device has been detached,
+ // the gallery permission has been removed, or any other reason.
+ watch_dropped
+ };
+
[inline_doc] enum GetMediaFileSystemsInteractivity {
// Do not act interactively.
no,
// The scan encountered an error and could not proceed.
error
};
+
+ [inline_doc] dictionary GalleryChangeDetails {
+ // Type of change event.
+ GalleryChangeType type;
+
+ // Identifies the modified gallery.
+ DOMString galleryId;
+ };
[inline_doc] dictionary MediaFileSystemsDetails {
// Whether to prompt the user for permission to additional media galleries
// The images embedded in the media file's metadata. This is most often
// used for album art or video thumbnails.
- [instanceof=Blob] object[] attachedImages;
+ [instanceOf=Blob] object[] attachedImages;
};
callback MediaMetadataCallback = void (MediaMetadata metadata);
};
interface Events {
+ // Fired when a media gallery is changed or a gallery watch is dropped.
+ static void onGalleryChanged(GalleryChangeDetails details);
+
// The pending media scan has changed state. See details for more
// information.
static void onScanProgress(ScanProgressDetails details);