Class CastMediaUtil

java.lang.Object
com.brightcove.cast.util.CastMediaUtil

public final class CastMediaUtil extends Object
An utility class to work with Google Cast and Brightcove Media.
  • 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 a MediaInfo object using a Video and a Source. The MediaMetadata will be created with the information available retrieved from the parameters.
      Parameters:
      context - the context
      video - the video
      source - the source
      Returns:
      the media info
    • toMediaInfo

      public static com.google.android.gms.cast.MediaInfo toMediaInfo(@NonNull Video video, @NonNull Source source)
      Creates a MediaInfo object using a Video and a Source. The MediaMetadata will be created with the information available retrieved from the parameters.
      Parameters:
      video - the video
      source - 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)
      Creates a MediaInfo object using a Video, a Source and the MediaMetadata. If the MediaMetadata is null, one will be created with the information available retrieved from the parameters.
      Parameters:
      context - the context
      video - the video
      source - the source
      mediaMetadata - the media metadata
      customData - 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 a MediaInfo object using a Video, a Source and the MediaMetadata. If the MediaMetadata is null, one will be created with the information available retrieved from the parameters.
      Parameters:
      video - the video
      source - the source
      mediaMetadata - the media metadata
      customData - 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 a MediaMetadata using the parameters passed.
      Parameters:
      title - the title
      subTitle - the sub title
      studio - the studio
      imageUrl - the image url
      bigImageUrl - the big image url
      Returns:
      the media metadata