Package 

Class Video

  • All Implemented Interfaces:
    android.os.Parcelable , java.io.Serializable

    
    public class Video
    extends MetadataObject implements Parcelable
                        

    The Video class is an immutable representation of all data related to a video, including associated metadata (in properties) and the groupings of source assets for this video.

    • Constructor Detail

      • Video

        Video(Map<String, Object> properties, Set<SourceCollection> sourceCollectionSet)
        Initializes a new Video with a predefined metadata properties collection and apredefined Set of SourceCollection objects.
        Parameters:
        properties - the metadata assigned to this instance
        sourceCollectionSet - the collections of video asset sources to associate with this Video
      • Video

        Video(Map<String, Object> properties, Set<SourceCollection> sourceCollectionSet, List<CuePoint> cuePoints)
        Initializes a new Video with a predefined metadata properties collection, apredefined Set of SourceCollection objects, and a list of cue points.
        Parameters:
        properties - the metadata assigned to this instance
        sourceCollectionSet - the collections of video asset sources to associate with this Video
    • Method Detail

      • getStatus

        @NonNull() Video.Status getStatus()

        Returns OK when the Video is valid and playable,or ERROR where there was an error while retrieving or creating the video.

      • getDownloadId

        @Nullable() UUID getDownloadId()

        Gets the globally unique identifier to the local copy of this video, if any.

      • setDownloadId

         void setDownloadId(@Nullable() UUID downloadId)

        Sets the globally unique identifier to the local copy of this video, if any. This methodexists so that globally unique identifier can be accessed conveniently fromthe associated video object.

        This method can be called only by methods within the SDK that have explicit permission.

        Parameters:
        downloadId - null if there is no local copy of the video, otherwise the globallyunique identifier.
      • setLicenseExpiryDate

         void setLicenseExpiryDate(@Nullable() Date expiryDate)

        Sets the UTC date and time when the offline playback license for this video is expected toexpire. Please note that changing this value here will not change the actual license expirydate. This method exists so that license expiry date can be accessed conveniently from theassociated video object.

        This method can be called only by methods within the SDK that have explicit permission.

        Parameters:
        expiryDate - null if the video has no offline playback license, otherwise the date.
      • fixProperties

         Video fixProperties()

        Ensures that the video properties to conform the expected value types.

      • createVideo

         static Video createVideo(@NonNull() String uri)

        Creates a Video object from a string path. The video's delivery type will be set for URLswhose path end with .mp4 and .m3u(8). Otherwise it will be UNKNOWN.

        Parameters:
        uri - String URI to video
      • createVideo

         static Video createVideo(@NonNull() String uri, Video.ProjectionFormat projectionFormat)

        Creates a Video object from a string path. The video's delivery type will be set for URLswhose path end with .mp4 and .m3u(8). Otherwise it will be UNKNOWN.

        Parameters:
        uri - String URI to video
        projectionFormat - the video projectionFormat
      • getId

        @NonNull() String getId()

        Convenience method for obtaining the parsed ID from the properties map.

      • getReferenceId

        @NonNull() String getReferenceId()

        Convenience method for obtaining the parsed reference identifier from the properties map.

      • getDuration

        @Deprecated() int getDuration()

        Convenience method for obtaining the parsed Duration value from the properties Map

      • getDurationLong

         long getDurationLong()

        Convenience method for obtaining the parsed Duration value from the properties Map

      • isVideo360

         boolean isVideo360()

        Checks if this is a 360 degree video.

      • isClearContent

         boolean isClearContent()

        Check if the video is DRM free content.

      • isOfflinePlaybackAllowed

         final boolean isOfflinePlaybackAllowed()

        Checks if the video can be stored locally on the host device. A video is considered storableif it has ODRM_PLAYBACK_ALLOWED flag set and has at least one DRM enabled source.

      • getName

        @NonNull() String getName()

        It gets the video name from the NAME video property if available,or an empty string otherwise.

      • getPosterImage

        @Nullable() URI getPosterImage()

        Gets the poster image source.

        It selects a source from the list of POSTER_SOURCES in the Video properties if available,giving preference to the HTTPS version of the poster source.

        If the POSTER_SOURCES video property is not available, it will return the STILL_IMAGE_URI video property, or null otherwise.

      • getThumbnail

        @Nullable() URI getThumbnail()

        Gets the thumbnail image source.

        It selects a source from the list of THUMBNAIL_SOURCES in the Video properties if available,giving preference to the HTTPS version of the thumbnail source.

        If the THUMBNAIL_SOURCES video property is not available, it will return the THUMBNAIL video property, or null otherwise.

      • isOwned

         boolean isOwned()

        Checks if the video has a valid purchase license.

      • isRented

         boolean isRented()

        Checks if the video has a valid rental license.

      • setOfflinePlaybackLicenseKey

         void setOfflinePlaybackLicenseKey(@Nullable() Array<byte> licenseKeySetId)

        Sets the key set identifier for the current offline playback license for this video, if any.This method exists so that the license key set identifier can be accessed conveniently fromthe associated video object. Setting or clearing the license key set identifier directlyusing this method will not grant or release the offline playback license.

        This method can be called only by methods within the SDK that have explicit permission.

        Parameters:
        licenseKeySetId - null if the video has no offline playback license, otherwise thelicense key identifier.
      • isOfflineCopy

         boolean isOfflineCopy()

        Checks if this video is an offline copy, if and only if all of its sources are local.