public static class MediaData.Builder
extends java.lang.Object
Constructor and Description |
---|
Builder(java.lang.String url)
Create the MediaData builder
|
Modifier and Type | Method and Description |
---|---|
MediaData.Builder |
addPhotoUrl(java.lang.String photoUrl)
Adds the photo url
|
MediaData |
build() |
MediaData.Builder |
setAutoPlay(boolean autoPlay)
Sets up playing on start
|
MediaData.Builder |
setContentType(java.lang.String contentType)
Sets the content type.
|
MediaData.Builder |
setMediaType(int mediaType)
Sets the media type.
|
MediaData.Builder |
setPosition(long position)
Sets the start position
|
MediaData.Builder |
setStreamDuration(long streamDuration)
Sets stream duration.
|
MediaData.Builder |
setStreamType(int streamType)
Sets the stream type.
|
MediaData.Builder |
setSubtitle(java.lang.String subtitle)
Sets the subtitle.
|
MediaData.Builder |
setTitle(java.lang.String title)
Sets the title.
|
public Builder(java.lang.String url)
url
- String url of media datapublic MediaData.Builder setStreamType(int streamType)
streamType
- One of MediaData.STREAM_TYPE_NONE
, MediaData.STREAM_TYPE_BUFFERED
, MediaData.STREAM_TYPE_LIVE
public MediaData.Builder setContentType(java.lang.String contentType)
contentType
- Valid content type, supported by Google Castpublic MediaData.Builder setStreamDuration(long streamDuration)
streamDuration
- Valid stream durationpublic MediaData.Builder setTitle(java.lang.String title)
title
- any Stringpublic MediaData.Builder setSubtitle(java.lang.String subtitle)
subtitle
- any Stringpublic MediaData.Builder setMediaType(int mediaType)
mediaType
- One of MediaData.MEDIA_TYPE_GENERIC
, MediaData.MEDIA_TYPE_MOVIE
, MediaData.MEDIA_TYPE_TV_SHOW
, MediaData.MEDIA_TYPE_MUSIC_TRACK
,
MediaData.MEDIA_TYPE_PHOTO
, MediaData.MEDIA_TYPE_USER
public MediaData.Builder addPhotoUrl(java.lang.String photoUrl)
photoUrl
- valid url to imagepublic MediaData.Builder setAutoPlay(boolean autoPlay)
autoPlay
- True if the media file should start automaticallypublic MediaData.Builder setPosition(long position)
position
- Start position of video in millisecondspublic MediaData build()