Package com.brightcove.cast.util
Class CastMediaUtil
- java.lang.Object
-
- com.brightcove.cast.util.CastMediaUtil
-
public final class CastMediaUtil extends java.lang.Object
An utility class to work with Google Cast and Brightcove Media.
-
-
Constructor Summary
Constructors Constructor Description CastMediaUtil()
-
Method Summary
All Methods Static Methods Concrete Methods Deprecated Methods Modifier and Type Method Description static com.google.android.gms.cast.MediaMetadata
createMediaMetadata(java.lang.String title, java.lang.String subTitle, java.lang.String studio, java.lang.String imageUrl, java.lang.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)
-
-
-
Method Detail
-
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(java.lang.String title, java.lang.String subTitle, java.lang.String studio, java.lang.String imageUrl, java.lang.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
-
-