Class 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 a MediaMetadata 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)
      static com.google.android.gms.cast.MediaInfo toMediaInfo​(Video video, Source source)
      Creates a MediaInfo object using a Video and a Source.
      static com.google.android.gms.cast.MediaInfo toMediaInfo​(Video video, Source source, com.google.android.gms.cast.MediaMetadata mediaMetadata, org.json.JSONObject customData)
      Creates a MediaInfo object using a Video, a Source and the MediaMetadata.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • CastMediaUtil

        public CastMediaUtil()
    • 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 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​(java.lang.String title,
                                                                                    java.lang.String subTitle,
                                                                                    java.lang.String studio,
                                                                                    java.lang.String imageUrl,
                                                                                    java.lang.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