REST Resource: mediaItems

  • This content describes the structure and metadata of media items, specifically photos, used in Google Photos for ambient display.

  • AmbientMediaItem represents a photo in Google Photos, with fields for its ID, creation time, and associated MediaFile.

  • MediaFile provides access to the media bytes via a base URL, along with its MIME type and associated MediaFileMetadata.

  • MediaFileMetadata details the media file's properties, such as dimensions, camera information, and includes a union field metadata that contains specific metadata like PhotoMetadata.

  • PhotoMetadata contains detailed information about photos, including focal length, aperture, ISO, and exposure time.

Resource: AmbientMediaItem

Representation of a photo in Google Photos being used for ambient display.

JSON representation
{
  "id": string,
  "createTime": string,
  "mediaFile": {
    object (MediaFile)
  }
}
Fields
id

string

Identifier for the media item.

This is a persistent identifier that can be used between sessions to identify this media item.

createTime

string (Timestamp format)

Time when the media item was created (not when it was uploaded to Google Photos).

Uses RFC 3339, where generated output will always be Z-normalized and uses 0, 3, 6 or 9 fractional digits. Offsets other than "Z" are also accepted. Examples: "2014-10-02T15:01:23Z", "2014-10-02T15:01:23.045123456Z" or "2014-10-02T15:01:23+05:30".

mediaFile

object (MediaFile)

The media file that constitutes this media item.

MediaFile

Representation of an individual file of media bytes.

JSON representation
{
  "baseUrl": string,
  "mimeType": string,
  "mediaFileMetadata": {
    object (MediaFileMetadata)
  }
}
Fields
baseUrl

string

A URL to fetch the media file's bytes.

To download a media file, the API client must add the parameters specified in the developer documentation to this URL.

mimeType

string

MIME type of the media file. For example, image/jpeg.

mediaFileMetadata

object (MediaFileMetadata)

Metadata related to the media file, such as height and width.

MediaFileMetadata

Metadata about a media file.

JSON representation
{
  "width": integer,
  "height": integer
}
Fields
width

integer

Original width (in pixels) of the media file.

height

integer

Original height (in pixels) of the media file.

Methods

list

Returns a list of ambient media items from user-configured media sources for the specified device.