Samsung Electronics logo

Samsung Web API: Content


Introduction

API to discover and manage images, videos, music and the other contents.

This API provides functionality to discover contents (such as images, videos, music or the other) that are available on the device. It is possible to search for specific contents using filters. The API also supports setting attributes of specific contents.

For more information on the Content features, see Content Guide.


Table of Contents


Summary of Interfaces and Methods

Interface Method
ContentManagerObject
ContentManager void update(Content content)
void updateBatch(Content[] contents, SuccessCallback? successCallback, ErrorCallback? errorCallback)
void getDirectories(ContentDirectoryArraySuccessCallback successCallback, ErrorCallback? errorCallback)
void find(ContentArraySuccessCallback successCallback, ErrorCallback? errorCallback, ContentDirectoryId? directoryId, AbstractFilter? filter, SortMode? sortMode, unsigned long? count, unsigned long? offset)
void scanFile(DOMString contentURI, ContentScanSuccessCallback? successCallback, ErrorCallback? errorCallback)
void setChangeListener(ContentChangeCallback changeCallback)
void unsetChangeListener()
ContentArraySuccessCallback void onsuccess(Content[] contents)
ContentDirectoryArraySuccessCallback void onsuccess(ContentDirectory[] directories)
ContentScanSuccessCallback void onsuccess(DOMString contentURI)
ContentChangeCallback void oncontentadded(Content content)
void oncontentupdated(Content content)
void oncontentremoved(ContentId id)
ContentDirectory
Content
VideoContent
AudioContentLyrics
AudioContent
ImageContent

1. Type Definitions

1.1. ContentDirectoryStorageType

  enum ContentDirectoryStorageType { "INTERNAL", "EXTERNAL" };

Defines whether a content directory is stored in the internal or external storage (such as a removable memory card).

1.2. ContentType

  enum ContentType { "IMAGE", "VIDEO", "AUDIO", "OTHER" };

Defines a type of content (image, video, audio and the other types).

"OTHER" type is added since 2.1.

1.3. AudioContentLyricsType

  enum AudioContentLyricsType { "SYNCHRONIZED", "UNSYNCHRONIZED" };

Defines whether a lyric supplied with an audio file is time-synchronized or not.

1.4. ImageContentOrientation

  enum ImageContentOrientation { "NORMAL", "FLIP_HORIZONTAL", "ROTATE_180", "FLIP_VERTICAL", "TRANSPOSE", "ROTATE_90", "TRANSVERSE", "ROTATE_270" };

Defines an orientation of an image.

1.5. ContentId

Content identifier.

  typedef DOMString ContentId;

1.6. ContentDirectoryId

Content directory identifier.

  typedef DOMString ContentDirectoryId;

2. Interfaces

2.1. ContentManagerObject

Defines what is instantiated in the webapis object.

  [NoInterfaceObject] interface ContentManagerObject {
    readonly attribute ContentManager content;
  };
  WebAPIs implements ContentManagerObject;

There will be a webapis.content object that allows accessing the functionality of the content module.

2.2. ContentManager

ContentManager interface that provides operations to retrieve and manipulate contents.

  [NoInterfaceObject] interface ContentManager {

    void update(Content content) raises(WebAPIException);

    void updateBatch(Content[] contents,
                     optional SuccessCallback? successCallback,
                     optional ErrorCallback? errorCallback) raises(WebAPIException);

    void getDirectories(ContentDirectoryArraySuccessCallback successCallback,
                        optional ErrorCallback? errorCallback) raises(WebAPIException);

    void find(ContentArraySuccessCallback successCallback,
              optional ErrorCallback? errorCallback,
              optional ContentDirectoryId? directoryId,
              optional AbstractFilter? filter,
              optional SortMode? sortMode,
              optional unsigned long? count,
              optional unsigned long? offset) raises(WebAPIException);


    void scanFile(DOMString contentURI,
                  optional ContentScanSuccessCallback? successCallback,
                  optional ErrorCallback? errorCallback) raises(WebAPIException);

    void setChangeListener(ContentChangeCallback changeCallback) raises(WebAPIException);

    void unsetChangeListener() raises(WebAPIException);

  };

METHODS

update

Changes attributes of a content in the content database, synchronously.

Signature
void update(Content content);

When an application has changed some attributes in a content, this method allows writing it back to the content database.

The editableAttributes in content interface indicates which attributes can be changed. This API does not support updating the metadata of the original file.

Parameters
  • content
    • Optional: No.
    • Nullable: No.
    • Type: Content.
    • Description: The content to update.
Exceptions
  • WebAPIException:

    with error type UnknownError in any other error case.

    with error type SecurityError, if the client does not have the permission to add alarms.

    with error type NotSupportedError, if this feature is not supported.

    with error type InvalidValuesError, if any of the input parameters contain an invalid value.

    with error type TypeMismatchError, if any input parameter is not compatible with the expected type for that parameter.

Code example
 // The following example changes a description.

 // Assume the content is a Content object as a result of find method.
 // Check the description is editable, and then set a description.
 if (content.editableAttributes.indexOf("description") >= 0) {
     content.description = "Sample content";
 }
 webapis.content.update(content);
 

updateBatch

Changes attributes of a number of contents in the content database, asynchronously.

Signature
void updateBatch(Content[] contents, optional SuccessCallback? successCallback, optional ErrorCallback? errorCallback);

When an application has changed any attributes in array of content, this method allows writing them back to the content database.

The errorCallback is launched with these error types:

  • InvalidValuesError: If any of the input parameters contain an invalid value.
  • UnknownError: In any other error case.

The editableAttributes in content interface indicates which attributes can be changed. This API does not support updating the metadata of the original file.

Parameters
  • contents
    • Optional: No.
    • Nullable: No.
    • Type: array.
    • Description: Array of content to change.
  • successCallback
    • Optional: Yes.
    • Nullable: Yes.
    • Type: SuccessCallback.
    • Description: Function called when attributes have been changed.
  • errorCallback
    • Optional: Yes.
    • Nullable: Yes.
    • Type: ErrorCallback.
    • Description: Function called when an error has occurred.
Exceptions
  • WebAPIException:

    with error type SecurityError, if this functionality is not allowed.

    with error type TypeMismatchError, if the input parameter is not compatible with the expected type for that parameter.

Code example
 // The following example increases rating of an content by 1

 function errorCB(err) {
     console.log( 'The following error occurred: ' +  err.name);
 }

 function successCB() {
     console.log('Attributes set successfully');
 }

 // Assume the content is a Content object as a result of find method.
 // Check the rating is editable, and then increase by 1.
 if (content.editableAttributes.indexOf("rating") >= 0) {
     content.rating++;
 }
 webapis.content.updateBatch([content], successCB, errorCB);
 

getDirectories

Gets a list of content directories.

Signature
void getDirectories(ContentDirectoryArraySuccessCallback successCallback, optional ErrorCallback? errorCallback);

This method returns (via callback) a list of content directory objects. To obtain a list of contents in a specific directory, use find() method with the directory ID.

The errorCallback is launched with these error types:

  • UnknownError: In any other error case.
Parameters
  • successCallback
    • Optional: No.
    • Nullable: No.
    • Type: ContentDirectoryArraySuccessCallback.
    • Description: Function called when content directories have been retrieved successfully.
  • errorCallback
    • Optional: Yes.
    • Nullable: Yes.
    • Type: ErrorCallback.
    • Description: Function called when an error has occurred.
Exceptions
  • WebAPIException:

    with error type TypeMismatchError, if the input parameter is not compatible with the expected type for that parameter.

Code example
 // The following example retrieves content directories in the storage.

 function errorCB(err) {
     console.log( 'The following error occurred: ' +  err.name);
 }

 function printDirectory(directory, index, directories) {
     console.log('directoryURI: ' + directory.directoryURI + ' Title: ' + directory.title);
 }
 function getDirectoriesCB(directories) {
     directories.forEach(printDirectory);
 }

 webapis.content.getDirectories(getDirectoriesCB, errorCB);
 

find

Finds contents that meets the search condition given by a filter

Signature
void find(ContentArraySuccessCallback successCallback, optional ErrorCallback? errorCallback, optional ContentDirectoryId? directoryId, optional AbstractFilter? filter, optional SortMode? sortMode, optional unsigned long? count, optional unsigned long? offset);

This method allows searching based on a supplied filter. For more detail on AbstractFilter, refer to the WebAPIs module. The filter allows precise searching such as "return all songs by artist U2, ordered by name".

The errorCallback is launched with these error types:

  • InvalidValuesError: If any of the input parameters contain an invalid value.
  • UnknownError: In any other error case.
Parameters
  • successCallback
    • Optional: No.
    • Nullable: No.
    • Type: ContentArraySuccessCallback.
    • Description: Function called when a content have been retrieved.
  • errorCallback
    • Optional: Yes.
    • Nullable: Yes.
    • Type: ErrorCallback.
    • Description: Function called when an error has occurred.
  • directoryId
    • Optional: Yes.
    • Nullable: Yes.
    • Type: ContentDirectoryId.
    • Description: Directory ID that is use to select content to retrieve in a specified directory.
  • filter
    • Optional: Yes.
    • Nullable: Yes.
    • Type: AbstractFilter.
    • Description: Filter that is used to select content to retrieve.
  • sortMode
    • Optional: Yes.
    • Nullable: Yes.
    • Type: SortMode.
    • Description: Used to determine the sort order in which the content are returned.
  • count
    • Optional: Yes.
    • Nullable: Yes.
    • Type: unsigned long.
    • Description: Maximum amount of content to return.
  • offset
    • Optional: Yes.
    • Nullable: Yes.
    • Type: unsigned long.
    • Description: Offset of the result set.
Exceptions
  • WebAPIException:

    with error type NotSupportedError, if this feature is not supported.

    with error type SecurityError, if this functionality is not allowed.

    with error type TypeMismatchError, if the input parameter is not compatible with the expected type for that parameter.

Code example
 // The following example retrieves all songs from the album "The Joshua Tree", by artist "U2", ordered by the track number.
 var count = 100;
 var offset = 0;
 var sortMode = new webapis.SortMode("trackNumber", "ASC");
 var artistFilter = new webapis.AttributeFilter("artists", "EXACTLY", "U2");
 var albumFilter = new webapis.AttributeFilter("album", "EXACTLY", "The Joshua Tree");
 var filter = new webapis.CompositeFilter("INTERSECTION", [albumFilter, artistFilter]);
 webapis.content.find(findCB, errorCB, null, filter, sortMode, count, offset);

 function errorCB(err) {
     console.log( 'The following error occurred: ' +  err.name);
 }

 function printContent(content, index, contents) {
     console.log('Track: ' + content.trackNumber + ' Title: ' + content.title + 'Duration: ' + content.duration + 'URL: ' + content.contentURI + 'MIME: ' + content.mimeType);
 }

 function findCB(contents) {
     console.log('The Joshua Tree by U2:');
     contents.forEach(printContent);
     // Increase the offset as much as the count and then find content again.
     if (contents.length == count) {
         offset += count;
         webapis.content.find(findCB, errorCB, null, filter, sortMode, count, offset);
     }
 }


 

scanFile

Scan a file to create or update a content in the content database.

Signature
void scanFile(DOMString contentURI, optional ContentScanSuccessCallback? successCallback, optional ErrorCallback? errorCallback);

When an application creates or updates a content, this method allows scan it to insert or update the content in the content database.

Parameters
  • contentURI
    • Optional: No.
    • Nullable: No.
    • Type: DOMString.
    • Description: The URI of content to scan.
  • successCallback
    • Optional: Yes.
    • Nullable: Yes.
    • Type: ContentScanSuccessCallback.
    • Description: Function called when scanning has been completed.
  • errorCallback
    • Optional: Yes.
    • Nullable: Yes.
    • Type: ErrorCallback.
    • Description: Function called when an error has occurred.
Exceptions
  • WebAPIException:

    with error type UnknownError in any other error case.

    with error type SecurityError, if the client does not have the permission to add alarms.

    with error type InvalidValuesError, if any of the input parameters contain an invalid value.

    with error type TypeMismatchError, if any input parameter is not compatible with the expected type for that parameter.

Code example
 // The following example scan 'samsung.jpg' in media directory

 function errorCB(err) {
     console.log( 'The following error occurred: ' +  err.name);
 }

 function successCB(path) {
     console.log('scanning is completed');
 }

 var path = "file:///opt/usr/media/samsung.jpg";
 webapis.content.scanFile(path, successCB, errorCB);

 

setChangeListener

Sets a listener to receive notifications about content changes.

Signature
void setChangeListener(ContentChangeCallback changeCallback);
Parameters
  • changeCallback
    • Optional: No.
    • Nullable: No.
    • Type: ContentChangeCallback.
    • Description: A callback to be invoked for receiving content changes.
Exceptions
  • WebAPIException:

    with error type UnknownError, if any other error occurs.

    with error type SecurityError, if the functionality is not allowed.

    with error type InvalidValuesError, if any of the input parameters contain an invalid value.

    with error type TypeMismatchError, if any input parameter is not compatible with the expected type for that parameter.

Code example
 var listener= {
    oncontentadded: function(content) {
        console.log(content.contentURI + ' content is added');
    },
    oncontentupdated: function(content) {
        console.log(content.contentURI + ' content is updated');
    },
    oncontentremoved: function(id) {
        console.log(id + ' is removed');
    }
 };

 // Registers to be notified when the content changes
 webapis.content.setChangeListener(listener);

 

unsetChangeListener

Unset the listener to stop receiving notification for content changes.

Signature
void unsetChangeListener();
Exceptions
  • WebAPIException:

    with error type UnknownError if any other error occurs.

    with error type SecurityError, if the functionality is not allowed.

Code example
 webapis.content.unsetChangeListener();

 

2.3. ContentArraySuccessCallback

The callback function used to return a list of content objects.

  [Callback=FunctionOnly, NoInterfaceObject] interface ContentArraySuccessCallback {
    void onsuccess(Content[] contents);
  };

METHODS

onsuccess

Called when the list of content is retrieved successfully.

Signature
void onsuccess(Content[] contents);
Parameters
  • contents
    • Optional: No.
    • Nullable: No.
    • Type: array.
    • Description: The array of Content objects.

2.4. ContentDirectoryArraySuccessCallback

The callback function used to return a list of ContentDirectory objects.

  [Callback=FunctionOnly, NoInterfaceObject] interface ContentDirectoryArraySuccessCallback {
    void onsuccess(ContentDirectory[] directories);
  };

METHODS

onsuccess

Called when the list of directory is retrieved successfully.

Signature
void onsuccess(ContentDirectory[] directories);
Parameters
  • directories
    • Optional: No.
    • Nullable: No.
    • Type: array.
    • Description: The array of ContentDirectory objects.

2.5. ContentScanSuccessCallback

The callback function used to return a content to scan has been completed.

  [Callback=FunctionOnly, NoInterfaceObject] interface ContentScanSuccessCallback {
    void onsuccess(DOMString contentURI);
  };

METHODS

onsuccess

Called when the scanning has been completed.

Signature
void onsuccess(DOMString contentURI);
Parameters
  • contentURI
    • Optional: No.
    • Nullable: No.
    • Type: DOMString.
    • Description: The URI of Content objects.

2.6. ContentChangeCallback

This interface specifies a set of methods that will be invoked every time a content change occurs.

  [Callback, NoInterfaceObject] interface ContentChangeCallback {
    void oncontentadded(Content content);

    void oncontentupdated(Content content);

    void oncontentremoved(ContentId id);
  };

METHODS

oncontentadded

Called when content is added.

Signature
void oncontentadded(Content content);
Parameters
  • content
    • Optional: No.
    • Nullable: No.
    • Type: Content.
    • Description: The content that is added.

oncontentupdated

Called when content is updated.

Signature
void oncontentupdated(Content content);
Parameters
  • content
    • Optional: No.
    • Nullable: No.
    • Type: Content.
    • Description: The content that is updated.

oncontentremoved

Called when content is removed.

Signature
void oncontentremoved(ContentId id);
Parameters
  • id
    • Optional: No.
    • Nullable: No.
    • Type: ContentId.
    • Description: The id of content that is removed.

2.7. ContentDirectory

The content directory interface that provides access to properties of a content directory.

  [NoInterfaceObject] interface ContentDirectory {

    readonly attribute ContentDirectoryId id;

    readonly attribute DOMString directoryURI;

    readonly attribute DOMString title;

    readonly attribute ContentDirectoryStorageType storageType;

    readonly attribute Date? modifiedDate;

   };

ATTRIBUTES

readonly ContentDirectoryId id

The opaque content directory ID.

This attribute is read-only.

readonly DOMString directoryURI

The directory path on the device.

This attribute is read-only.

readonly DOMString title

The directory name.

This attribute is read-only.

readonly ContentDirectoryStorageType storageType

The type of a device storage.

This attribute is read-only.

readonly Date? modifiedDate

The directory modification date.

This attribute is read-only.

2.8. Content

The content interface that provides access to properties of content.

  [NoInterfaceObject] interface Content {

    readonly attribute DOMString[] editableAttributes;

    readonly attribute ContentId id;

    attribute DOMString name;

    readonly attribute ContentType type;

    readonly attribute DOMString mimeType;

    readonly attribute DOMString title;

    readonly attribute DOMString contentURI;

    readonly attribute DOMString[]? thumbnailURIs;

    readonly attribute Date? releaseDate;

    readonly attribute Date? modifiedDate;

    readonly attribute unsigned long size;

    attribute DOMString? description;

    attribute unsigned long rating;
  };

ATTRIBUTES

readonly DOMString[] editableAttributes

The list of attributes that can be written back to the local backend using update or updateBatch method.

This attribute is read-only.

readonly ContentId id

The opaque content ID.

This attribute is read-only.

DOMString name

The name of content. The initial value is the file name of the content.

readonly ContentType type

The content type.

This attribute is read-only.

readonly DOMString mimeType

The content MIME type.

This attribute is read-only.

readonly DOMString title

The content title.

This attribute is read-only.

readonly DOMString contentURI

The URI that can be used to access the content.

This attribute is read-only.

readonly DOMString[]? thumbnailURIs

The array of content thumbnails URIs.

This attribute is read-only.

readonly Date? releaseDate

The date when a content has been released to the public. If only the release year is known, then the day and month are set to January 1st.

This attribute is read-only.

readonly Date? modifiedDate

The date when this content has last been modified.

This attribute is read-only.

readonly unsigned long size

The file size of the content in bytes.

This attribute is read-only.

DOMString? description

The content description.

unsigned long rating

The content rating (value varies from 0 to 10).

2.9. VideoContent

The interface that extends a basic content object with video-specific attributes.

  [NoInterfaceObject] interface VideoContent : Content {

    attribute SimpleCoordinates? geolocation;

    readonly attribute DOMString? album;

    readonly attribute DOMString[]? artists;

    readonly attribute unsigned long duration;

    readonly attribute unsigned long width;

    readonly attribute unsigned long height;

  };

ATTRIBUTES

SimpleCoordinates? geolocation

The geographical location where the video was made.

readonly DOMString? album

The album name to which the video belongs.

This attribute is read-only.

readonly DOMString[]? artists

The list of artists that created the video.

This attribute is read-only.

readonly unsigned long duration

The video duration in milliseconds.

This attribute is read-only.

readonly unsigned long width

The width of the video in pixels.

This attribute is read-only.

readonly unsigned long height

The height of the video in pixels.

This attribute is read-only.

2.10. AudioContentLyrics

The interface that provides lyrics for music.

  [NoInterfaceObject] interface AudioContentLyrics {

    readonly attribute AudioContentLyricsType type;

    readonly attribute unsigned long[] timestamps;

    readonly attribute DOMString[] texts;
  };

ATTRIBUTES

readonly AudioContentLyricsType type

The type of lyrics: whether they are synchronized with the music or not.

This attribute is read-only.

readonly unsigned long[] timestamps

The array of timestamps in milliseconds for lyrics.

If the lyrics are not synchronized (if there is no time information for the lyrics) the array is undefined.

This attribute is read-only.

readonly DOMString[] texts

The array of lyric snippets.

If the lyrics are not synchronized, the array has only one member with full lyrics.

This attribute is read-only.

2.11. AudioContent

The interface that extends a basic content object with audio-specific attributes.

  [NoInterfaceObject] interface AudioContent : Content {

    readonly attribute DOMString? album;

    readonly attribute DOMString[]? genres;

    readonly attribute DOMString[]? artists;

    readonly attribute DOMString[]? composers;

    readonly attribute AudioContentLyrics? lyrics;

    readonly attribute DOMString? copyright;

    readonly attribute unsigned long bitrate;

    readonly attribute unsigned short? trackNumber;

    readonly attribute unsigned long duration;

  };

ATTRIBUTES

readonly DOMString? album

The album name that the audio belongs to.

This attribute is read-only.

readonly DOMString[]? genres

The list of genres that the audio belongs to.

This attribute is read-only.

readonly DOMString[]? artists

The list of artists that created the audio.

This attribute is read-only.

readonly DOMString[]? composers

The list of composers for the music.

This attribute is read-only.

readonly AudioContentLyrics? lyrics

The lyrics to the song that is contained in the audio.

This attribute is read-only.

The copyright information.

This attribute is read-only.

readonly unsigned long bitrate

The audio bitrate in bits per second. By default, this value is 0.

This attribute is read-only.

readonly unsigned short? trackNumber

The track number if the audio belongs to an album.

This attribute is read-only.

readonly unsigned long duration

The audio duration in milliseconds.

This attribute is read-only.

2.12. ImageContent

The interface that extends a basic content object with image-specific attributes.

  [NoInterfaceObject] interface ImageContent : Content {

    attribute SimpleCoordinates? geolocation;

    readonly attribute unsigned long width;

    readonly attribute unsigned long height;

    attribute ImageContentOrientation orientation;

  };

ATTRIBUTES

SimpleCoordinates? geolocation

The geographical location where the image has been made.

readonly unsigned long width

The width of the Image in pixels.

This attribute is read-only.

readonly unsigned long height

The height of the Image in pixels.

This attribute is read-only.

ImageContentOrientation orientation

Information about image orientation.

3. Full WebIDL

module Content {

  enum ContentDirectoryStorageType { "INTERNAL", "EXTERNAL" };

  enum ContentType { "IMAGE", "VIDEO", "AUDIO", "OTHER" };

  enum AudioContentLyricsType { "SYNCHRONIZED", "UNSYNCHRONIZED" };

  enum ImageContentOrientation { "NORMAL", "FLIP_HORIZONTAL", "ROTATE_180", "FLIP_VERTICAL", "TRANSPOSE", "ROTATE_90", "TRANSVERSE", "ROTATE_270" };

  typedef DOMString ContentId;

  typedef DOMString ContentDirectoryId;

  [NoInterfaceObject] interface ContentManagerObject {
    readonly attribute ContentManager content;
  };
  WebAPIs implements ContentManagerObject;

  [NoInterfaceObject] interface ContentManager {

    void update(Content content) raises(WebAPIException);

    void updateBatch(Content[] contents,
                     optional SuccessCallback? successCallback,
                     optional ErrorCallback? errorCallback) raises(WebAPIException);

    void getDirectories(ContentDirectoryArraySuccessCallback successCallback,
                        optional ErrorCallback? errorCallback) raises(WebAPIException);

    void find(ContentArraySuccessCallback successCallback,
              optional ErrorCallback? errorCallback,
              optional ContentDirectoryId? directoryId,
              optional AbstractFilter? filter,
              optional SortMode? sortMode,
              optional unsigned long? count,
              optional unsigned long? offset) raises(WebAPIException);


    void scanFile(DOMString contentURI,
                  optional ContentScanSuccessCallback? successCallback,
                  optional ErrorCallback? errorCallback) raises(WebAPIException);

    void setChangeListener(ContentChangeCallback changeCallback) raises(WebAPIException);

    void unsetChangeListener() raises(WebAPIException);

  };

  [Callback=FunctionOnly, NoInterfaceObject] interface ContentArraySuccessCallback {
    void onsuccess(Content[] contents);
  };

  [Callback=FunctionOnly, NoInterfaceObject] interface ContentDirectoryArraySuccessCallback {
    void onsuccess(ContentDirectory[] directories);
  };

  [Callback=FunctionOnly, NoInterfaceObject] interface ContentScanSuccessCallback {
    void onsuccess(DOMString contentURI);
  };

  [Callback, NoInterfaceObject] interface ContentChangeCallback {
    void oncontentadded(Content content);

    void oncontentupdated(Content content);

    void oncontentremoved(ContentId id);
  };


  [NoInterfaceObject] interface ContentDirectory {

    readonly attribute ContentDirectoryId id;

    readonly attribute DOMString directoryURI;

    readonly attribute DOMString title;

    readonly attribute ContentDirectoryStorageType storageType;

    readonly attribute Date? modifiedDate;

   };

  [NoInterfaceObject] interface Content {

    readonly attribute DOMString[] editableAttributes;

    readonly attribute ContentId id;

    attribute DOMString name;

    readonly attribute ContentType type;

    readonly attribute DOMString mimeType;

    readonly attribute DOMString title;

    readonly attribute DOMString contentURI;

    readonly attribute DOMString[]? thumbnailURIs;

    readonly attribute Date? releaseDate;

    readonly attribute Date? modifiedDate;

    readonly attribute unsigned long size;

    attribute DOMString? description;

    attribute unsigned long rating;
  };

  [NoInterfaceObject] interface VideoContent : Content {

    attribute SimpleCoordinates? geolocation;

    readonly attribute DOMString? album;

    readonly attribute DOMString[]? artists;

    readonly attribute unsigned long duration;

    readonly attribute unsigned long width;

    readonly attribute unsigned long height;

  };


  [NoInterfaceObject] interface AudioContentLyrics {

    readonly attribute AudioContentLyricsType type;

    readonly attribute unsigned long[] timestamps;

    readonly attribute DOMString[] texts;
  };

  [NoInterfaceObject] interface AudioContent : Content {

    readonly attribute DOMString? album;

    readonly attribute DOMString[]? genres;

    readonly attribute DOMString[]? artists;

    readonly attribute DOMString[]? composers;

    readonly attribute AudioContentLyrics? lyrics;

    readonly attribute DOMString? copyright;

    readonly attribute unsigned long bitrate;

    readonly attribute unsigned short? trackNumber;

    readonly attribute unsigned long duration;

  };

  [NoInterfaceObject] interface ImageContent : Content {

    attribute SimpleCoordinates? geolocation;

    readonly attribute unsigned long width;

    readonly attribute unsigned long height;

    attribute ImageContentOrientation orientation;

  };
};