An AdWords media object.
Methods:
getDimensions()
Returns a
MediaDimensions instance for the media object if it is an image or video.
Return values:
getFileSize()
Returns the size of the media file in bytes.
Return values:
Type | Description |
Long |
The file size. |
getId()
Returns the ID of the media object.
Return values:
Type | Description |
Long |
The media ID. |
getMimeType()
Returns a MIME type identifier for the media object.
For example, this returns
IMAGE_PNG
for the
image/png
MIME type. See the
API documentation
for all possible values.
Return values:
Type | Description |
String |
The MIME type. |
getName()
Returns the name of the media object.
Return values:
Type | Description |
String |
The media object's name. |
getReferenceId()
Returns the media object's reference ID key.
Return values:
Type | Description |
String |
The media reference ID. |
getSourceUrl()
Returns the URL where the original media was downloaded from.
Return values:
Type | Description |
String |
The source URL. |
getType()
Returns the media object's type. This is one of
AUDIO
,
DYNAMIC_IMAGE
,
ICON
,
IMAGE
,
STANDARD_ICON
,
VIDEO
, or
MEDIA_BUNDLE
.
Return values:
Type | Description |
String |
The media type. |
getUrls()
Returns a
MediaUrls instance for the media object if it is an image.
Return values:
getYouTubeVideoId()
Returns the YouTube video ID if this media is a YouTube video, or
null
otherwise.
Returns nothing.