MediaItem object using the
*
* opensocial.newMediaItem() method.
*
* @name opensocial.MediaItem
*/
/**
* Represents images, movies, and audio.
*
* @param {String} mimeType The media's type
* @param {String} url The media's location
* @param {Map.* See also: * * opensocial.MediaItem.Field *
* * @name opensocial.MediaItem.Type = { */ opensocial.MediaItem.Type = { /** * This field may be used interchangeably with the string 'image'. * @member opensocial.MediaItem.Type */ IMAGE : 'image', /** * This field may be used interchangeably with the string 'video'. * @member opensocial.MediaItem.Type */ VIDEO : 'video', /** * This field may be used interchangeably with the string 'audio'. * @member opensocial.MediaItem.Type */ AUDIO : 'audio' } /** * @static * @class * All of the fields that media items have. * ** See also: * * opensocial.MediaItem.getField() *
* * @name opensocial.MediaItem.Field */ opensocial.MediaItem.Field = { /** * The type of media, specified as a * *MediaItem.Type object.
* This field may be used interchangeably with the string 'type'.
* @member opensocial.MediaItem.Field
*/
TYPE : 'type',
/**
* The MIME type of media, specified as a string.
* This field may be used interchangeably with the string 'mimeType'.
* @member opensocial.MediaItem.Field
*/
MIME_TYPE : 'mimeType',
/**
* A string specifying the URL where the media can be found.
* This field may be used interchangeably with the string 'url'.
* @member opensocial.MediaItem.Field
*/
URL : 'url'
};
/**
* Gets the media item data that's associated with the specified key.
*
* @param {String} key The key to get data for; see the
* Field class
* for possible values
* @param {Map.<opensocial.DataRequest.DataRequestFields, Object>}
* opt_params Additional
* params
* to pass to the request.
* @return {String} The data
*/
opensocial.MediaItem.prototype.getField = function(key, opt_params) {};
/**
* Sets data for this media item associated with the given key.
*
* @param {String} key The key to set data for
* @param {String} data The data to set
*/
opensocial.MediaItem.prototype.setField = function(key, data) {};