Page Summary
-
This content describes the structure and metadata of media items, specifically photos, used in Google Photos for ambient display.
-
AmbientMediaItemrepresents a photo in Google Photos, with fields for its ID, creation time, and associatedMediaFile. -
MediaFileprovides access to the media bytes via a base URL, along with its MIME type and associatedMediaFileMetadata. -
MediaFileMetadatadetails the media file's properties, such as dimensions, camera information, and includes a union fieldmetadatathat contains specific metadata likePhotoMetadata. -
PhotoMetadatacontains 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 (
|
| Fields | |
|---|---|
id
|
Identifier for the media item. This is a persistent identifier that can be used between sessions to identify this media item. |
createTime
|
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: |
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 (
|
| Fields | |
|---|---|
baseUrl
|
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
|
MIME type of the media file. For example, |
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
|
Original width (in pixels) of the media file. |
height
|
Original height (in pixels) of the media file. |
Methods |
|
|---|---|
|
Returns a list of ambient media items from user-configured media sources for the specified device. |


