Opensocial.MediaItem (v0.9)

Opensocial.MediaItem (v0.9)

NeedsExamples

opensocial.MediaItem

Represents images, movies, and audio. Create a MediaItem object using the opensocial.newMediaItem() method.

Methods

opensocial.MediaItem.getField

;String getField(key, opt_params)

Parameters
NameTypeDescription |

Returns
TypeDescription |

Description
Gets the media item data that's associated with the specified key.

opensocial.MediaItem.setField

;setField(key, data)

Parameters
NameTypeDescription |

Description
Sets data for this media item associated with the given key.

opensocial.MediaItem.Field

All of the fields that media items have. See also: opensocial.MediaItem.getField()

opensocial.MediaItem.Field.ALBUM_ID

string, album to which the media item belongs This field may be used interchangeably with the string 'albumId'.

opensocial.MediaItem.Field.CREATED

string, creation time associated with the media item - assigned by container in UTC This field may be used interchangeably with the string 'created'.

opensocial.MediaItem.Field.DESCRIPTION

string, description of the media item This field may be used interchangeably with the string 'description'.

opensocial.MediaItem.Field.DURATION

integer, for audio/video clips - playtime length in seconds. set to -1/not defined if unknown This field may be used interchangeably with the string 'duration'.

opensocial.MediaItem.Field.FILE_SIZE

long, number of bytes (set to -1/undefined if unknown). This field may be used interchangeably with the string 'fileSize'.

opensocial.MediaItem.Field.ID

string, id Associated with the media item This field may be used interchangeably with the string 'id'.

opensocial.MediaItem.Field.LANGUAGE

string, language associated with the media item in ISO 639-3 format This field may be used interchangeably with the string 'language'.

opensocial.MediaItem.Field.LAST_UPDATED

string, update time associated with the media item - assigned by container in UTC This field may be used interchangeably with the string 'lastUpdated'.

opensocial.MediaItem.Field.LOCATION

opensocial.Address, location corresponding to the media item This field may be used interchangeably with the string 'location'.

opensocial.MediaItem.Field.MIME_TYPE

The MIME type of media, specified as a string. This field may be used interchangeably with the string 'mimeType'.

opensocial.MediaItem.Field.NUM_COMMENTS

integer, number of comments on the photo. This field may be used interchangeably with the string 'numComments'.

opensocial.MediaItem.Field.NUM_VIEWS

integer, number of views for the media item. This field may be used interchangeably with the string 'numViews'.

opensocial.MediaItem.Field.NUM_VOTES

integer, number of votes received for voting. This field may be used interchangeably with the string 'numVotes'.

opensocial.MediaItem.Field.RATING

integer, average rating of the media item on a scale of 0-10. This field may be used interchangeably with the string 'rating'.

opensocial.MediaItem.Field.START_TIME

string, for streaming/live content, time when the content is available. This field may be used interchangeably with the string 'startTime'.

opensocial.MediaItem.Field.TAGGED_PEOPLE

<static> Member of: opensocial.MediaItem.Field.TAGGED_PEOPLE array of strings, array of string (IDs) of people tagged in the media item This field may be used interchangeably with the string 'taggedPeople'.

opensocial.MediaItem.Field.TAGS

array of strings, tags associated with this media item. This field may be used interchangeably with the string 'tags'.

opensocial.MediaItem.Field.THUMBNAIL_URL

<static> Member of: opensocial.MediaItem.Field.THUMBNAIL_URL string, URL to a thumbnail image of the media item This field may be used interchangeably with the string 'thumbnailUrl'.

opensocial.MediaItem.Field.TITLE

string describing the media item This field may be used interchangeably with the string 'title'.

opensocial.MediaItem.Field.TYPE

The type of media, specified as a MediaItem.Type object. This field may be used interchangeably with the string 'type'.

opensocial.MediaItem.Field.URL

A string specifying the URL where the media can be found. This field may be used interchangeably with the string 'url'.

opensocial.MediaItem.Type

The possible types of media items. See also: opensocial.MediaItem.Field

opensocial.MediaItem.Type.AUDIO

This field may be used interchangeably with the string 'audio'.

opensocial.MediaItem.Type.IMAGE

This field may be used interchangeably with the string 'image'.

opensocial.MediaItem.Type.VIDEO

This field may be used interchangeably with the string 'video'.

{{ JsApiAlphaList_(v0.9) }}