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
-
Method Summary
Modifier and TypeMethodDescriptionstatic com.google.android.gms.cast.MediaMetadata
createMediaMetadata
(String title, String subTitle, String studio, String imageUrl, String bigImageUrl) Creates aMediaMetadata
using the parameters passed.static com.google.android.gms.cast.MediaInfo
toMediaInfo
(android.content.Context context, Video video, Source source) Deprecated.static com.google.android.gms.cast.MediaInfo
toMediaInfo
(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.MediaInfo
toMediaInfo
(Video video, Source source) static com.google.android.gms.cast.MediaInfo
toMediaInfo
(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 aMediaInfo
object using aVideo
and aSource
. TheMediaMetadata
will 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 aMediaInfo
object using aVideo
and aSource
. TheMediaMetadata
will 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 aMediaInfo
object using aVideo
, aSource
and theMediaMetadata
. If theMediaMetadata
is 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 aMediaInfo
object using aVideo
, aSource
and theMediaMetadata
. If theMediaMetadata
is 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 aMediaMetadata
using 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)
.