Class Playlist

java.lang.Object
com.brightcove.player.model.MetadataObject
com.brightcove.player.model.Playlist
All Implemented Interfaces:
android.os.Parcelable, Serializable

public class Playlist extends MetadataObject implements android.os.Parcelable
See Also:
  • Field Details

    • EMPTY_PLAYLIST

      public static final Playlist EMPTY_PLAYLIST
      An empty playlist.
    • PARCEL_OBJECT_TYPE

      public static final int PARCEL_OBJECT_TYPE
      The type of the parcelable object.
      See Also:
    • CREATOR

      public static android.os.Parcelable.Creator<Playlist> CREATOR
      Creator for de-serializing playlist from the given Parcel.
  • Constructor Details

    • Playlist

      public Playlist(Map<String,Object> properties)
      See Also:
    • Playlist

      public Playlist(Map<String,Object> properties, List<Video> videos)
      Initializes a new Playlist with a predefined metadata properties collection and a predefined List of Video objects.
      Parameters:
      properties - the metadata assigned to this instance
      videos - a List of videos to associate with this Playlist
      Throws:
      IllegalArgumentException - if either or both arguments are null
  • Method Details

    • getVideos

      public List<Video> getVideos()
      Retrieves the ordered List of valid Videos contained in this Playlist. Only videos with Video.Status.OK will be returned.
      Returns:
      ordered List of valid videos
    • getErrorVideos

      public List<Video> getErrorVideos()
      Retrieves the ordered List of error Videos contained in this Playlist. Only videos with Video.Status.ERROR will be returned.
      Returns:
      ordered List of error Videos
    • getAllVideosAndErrors

      public List<Video> getAllVideosAndErrors()
      Retrieves the ordered List of all valid Videos and error Videos. All videos with both Video.Status.OK and Video.Status.ERROR will be returned.
      Returns:
      ordered List of valid videos and error Videos.
    • getCount

      public Integer getCount()
      Retrieves the number of valid videos in this Playlist.
      Returns:
      the number of valid videos in this playlist
    • toString

      @NonNull public String toString()
      Overrides:
      toString in class MetadataObject
    • describeContents

      public int describeContents()
      Specified by:
      describeContents in interface android.os.Parcelable
    • writeToParcel

      public void writeToParcel(android.os.Parcel parcel, int i)
      Specified by:
      writeToParcel in interface android.os.Parcelable