Package com.brightcove.cast.util
Class CastMediaUtil
java.lang.Object
com.brightcove.cast.util.CastMediaUtil
An utility class to work with Google Cast and Brightcove Media.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic com.google.android.gms.cast.MediaMetadatacreateMediaMetadata(String title, String subTitle, String studio, String imageUrl, String bigImageUrl) Creates aMediaMetadatausing the parameters passed.static com.google.android.gms.cast.MediaInfotoMediaInfo(android.content.Context context, Video video, Source source) Deprecated.static com.google.android.gms.cast.MediaInfotoMediaInfo(android.content.Context context, Video video, Source source, com.google.android.gms.cast.MediaMetadata mediaMetadata, org.json.JSONObject customData) Deprecated.static com.google.android.gms.cast.MediaInfotoMediaInfo(Video video, Source source) static com.google.android.gms.cast.MediaInfotoMediaInfo(Video video, Source source, com.google.android.gms.cast.MediaMetadata mediaMetadata, org.json.JSONObject customData)
-
Constructor Details
-
CastMediaUtil
public CastMediaUtil()
-
-
Method Details
-
toMediaInfo
@Deprecated public static com.google.android.gms.cast.MediaInfo toMediaInfo(@NonNull android.content.Context context, @NonNull Video video, @NonNull Source source) Deprecated.Creates aMediaInfoobject using aVideoand aSource. TheMediaMetadatawill be created with the information available retrieved from the parameters.- Parameters:
context- the contextvideo- the videosource- the source- Returns:
- the media info
-
toMediaInfo
public static com.google.android.gms.cast.MediaInfo toMediaInfo(@NonNull Video video, @NonNull Source source) Creates aMediaInfoobject using aVideoand aSource. TheMediaMetadatawill be created with the information available retrieved from the parameters.- Parameters:
video- the videosource- the source- Returns:
- the media info
-
toMediaInfo
@Deprecated public static com.google.android.gms.cast.MediaInfo toMediaInfo(@NonNull android.content.Context context, @NonNull Video video, @NonNull Source source, @Nullable com.google.android.gms.cast.MediaMetadata mediaMetadata, @Nullable org.json.JSONObject customData) Deprecated.Creates aMediaInfoobject using aVideo, aSourceand theMediaMetadata. If theMediaMetadatais null, one will be created with the information available retrieved from the parameters.- Parameters:
context- the contextvideo- the videosource- the sourcemediaMetadata- the media metadatacustomData- the cast custom data- Returns:
- the media info
-
toMediaInfo
public static com.google.android.gms.cast.MediaInfo toMediaInfo(@NonNull Video video, @NonNull Source source, @Nullable com.google.android.gms.cast.MediaMetadata mediaMetadata, @Nullable org.json.JSONObject customData) Creates aMediaInfoobject using aVideo, aSourceand theMediaMetadata. If theMediaMetadatais null, one will be created with the information available retrieved from the parameters.- Parameters:
video- the videosource- the sourcemediaMetadata- the media metadatacustomData- the cast custom data- Returns:
- the media info
-
createMediaMetadata
public static com.google.android.gms.cast.MediaMetadata createMediaMetadata(String title, String subTitle, String studio, String imageUrl, String bigImageUrl) Creates aMediaMetadatausing the parameters passed.- Parameters:
title- the titlesubTitle- the sub titlestudio- the studioimageUrl- the image urlbigImageUrl- the big image url- Returns:
- the media metadata
-
toMediaInfo(Video, Source).