public class Video extends MetadataObject implements android.os.Parcelable
Modifier and Type | Class and Description |
---|---|
static interface |
Video.CanSetDownloadIdentifier
Any method attempting to call
setDownloadId(UUID) must be annotated explicitly with
this annotation. |
static interface |
Video.CanSetLicenseExpiryDate
Any method attempting to call
setLicenseExpiryDate(Date) must be annotated explicitly
with this annotation. |
static interface |
Video.CanSetLicenseKeySetId
Any method attempting to call
setOfflinePlaybackLicenseKey(byte[]) must be annotated
explicitly with this annotation. |
static class |
Video.Fields
Provides the list of known field names that can appear in the properties Map.
|
static class |
Video.ProjectionFormat
The list of known projection formats.
|
Modifier and Type | Field and Description |
---|---|
static android.os.Parcelable.Creator<Video> |
CREATOR
Creator for de-serializing Video object from the given
Parcel . |
static int |
PARCEL_OBJECT_TYPE
The type of the parcelable object.
|
properties, TAG
Constructor and Description |
---|
Video(java.util.Map<java.lang.String,java.lang.Object> properties) |
Video(java.util.Map<java.lang.String,java.lang.Object> properties,
java.util.Set<SourceCollection> sourceCollectionSet)
Initializes a new Video with a predefined metadata properties collection and a
predefined Set of SourceCollection objects.
|
Video(java.util.Map<java.lang.String,java.lang.Object> properties,
java.util.Set<SourceCollection> sourceCollectionSet,
java.util.List<CuePoint> cuePoints)
Initializes a new Video with a predefined metadata properties collection, a
predefined Set of SourceCollection objects, and a list of cue points.
|
Modifier and Type | Method and Description |
---|---|
static Video |
createVideo(java.lang.String uri)
Creates a Video object from a string path.
|
static Video |
createVideo(java.lang.String uri,
DeliveryType type)
Creates a Video object from a string path.
|
static Video |
createVideo(java.lang.String uri,
DeliveryType type,
Video.ProjectionFormat projectionFormat)
Creates a Video object from a string path.
|
static Video |
createVideo(java.lang.String uri,
Video.ProjectionFormat projectionFormat)
Creates a Video object from a string path.
|
int |
describeContents() |
Source |
findHighQualitySource(DeliveryType deliveryType)
Finds the source with highest bitrate for the specified delivery type.
|
Source |
findLowQualitySource(DeliveryType deliveryType)
Finds the source with lowest bitrate for the specified delivery type.
|
Video |
fixProperties()
Ensures that the video properties to conform the expected value types.
|
java.util.List<CuePoint> |
getCuePoints()
Retrieve a list of the cue points associated with this Video.
|
java.lang.String |
getDescription() |
java.util.UUID |
getDownloadId()
Gets the globally unique identifier to the local copy of this video, if any.
|
int |
getDuration()
Convenience method for obtaining the parsed Duration value from the properties Map
|
java.lang.String |
getId()
Convenience method for obtaining the parsed ID from the properties map.
|
java.util.Date |
getLicenseExpiryDate()
Gets the UTC date and time when the offline playback license for this video will expire.
|
java.lang.String |
getName() |
byte[] |
getOfflinePlaybackLicenseKey()
Gets the key set identifier for the current offline playback license for this video, if any.
|
Video.ProjectionFormat |
getProjectionFormat()
Gets the video format.
|
java.lang.String |
getReferenceId()
Convenience method for obtaining the parsed reference identifier from the properties map.
|
java.util.Map<DeliveryType,SourceCollection> |
getSourceCollections()
Retrieve a Set of the SourceCollections associated with this Video.
|
java.net.URI |
getStillImageUri() |
boolean |
isClearContent()
Check if the video is DRM free content.
|
boolean |
isOfflineCopy()
Checks if this video is an offline copy, if and only if all of its sources are local.
|
boolean |
isOfflinePlaybackAllowed()
Checks if the video can be stored locally on the host device.
|
boolean |
isOwned()
Checks if the video has a valid purchase license.
|
boolean |
isRented()
Checks if the video has a valid rental license.
|
boolean |
isVideo360()
Checks if this is a 360 degree video.
|
void |
setDownloadId(java.util.UUID downloadId)
Sets the globally unique identifier to the local copy of this video, if any.
|
void |
setLicenseExpiryDate(java.util.Date expiryDate)
Sets the UTC date and time when the offline playback license for this video is expected to
expire.
|
void |
setOfflinePlaybackLicenseKey(byte[] licenseKeySetId)
Sets the key set identifier for the current offline playback license for this video, if any.
|
java.lang.String |
toString() |
void |
writeToParcel(android.os.Parcel parcel,
int i) |
getIntegerProperty, getIntegerProperty, getProperties, getStringProperty, getStringProperty
public static final int PARCEL_OBJECT_TYPE
public static android.os.Parcelable.Creator<Video> CREATOR
Parcel
.public Video(java.util.Map<java.lang.String,java.lang.Object> properties)
public Video(java.util.Map<java.lang.String,java.lang.Object> properties, java.util.Set<SourceCollection> sourceCollectionSet)
properties
- the metadata assigned to this instancesourceCollectionSet
- the collections of video asset sources to associate with this Videojava.lang.IllegalArgumentException
- if either or both arguments are nullpublic Video(java.util.Map<java.lang.String,java.lang.Object> properties, java.util.Set<SourceCollection> sourceCollectionSet, java.util.List<CuePoint> cuePoints)
properties
- the metadata assigned to this instancesourceCollectionSet
- the collections of video asset sources to associate with this Videojava.lang.IllegalArgumentException
- if either or both arguments are nullpublic Video fixProperties()
public static Video createVideo(@NonNull java.lang.String uri)
uri
- String URI to videopublic static Video createVideo(@NonNull java.lang.String uri, Video.ProjectionFormat projectionFormat)
uri
- String URI to videoprojectionFormat
- the video projectionFormatpublic static Video createVideo(@NonNull java.lang.String uri, DeliveryType type)
uri
- String URI to videotype
- DeliveryTypepublic static Video createVideo(@NonNull java.lang.String uri, @Nullable DeliveryType type, @Nullable Video.ProjectionFormat projectionFormat)
uri
- String URI to videotype
- DeliveryTypeprojectionFormat
- the projection formatpublic java.util.List<CuePoint> getCuePoints()
public java.util.Map<DeliveryType,SourceCollection> getSourceCollections()
@Nullable public Source findHighQualitySource(@NonNull DeliveryType deliveryType)
deliveryType
- the delivery type.@Nullable public Source findLowQualitySource(@NonNull DeliveryType deliveryType)
deliveryType
- the delivery type.public java.lang.String toString()
toString
in class MetadataObject
@NonNull public java.lang.String getId()
@Nullable public java.lang.String getReferenceId()
public int getDuration()
@NonNull public Video.ProjectionFormat getProjectionFormat()
Video.ProjectionFormat.NORMAL
public boolean isVideo360()
public boolean isClearContent()
public final boolean isOfflinePlaybackAllowed()
Video.Fields.ODRM_PLAYBACK_ALLOWED
flag set and has at least one DRM enabled source.@Nullable public java.lang.String getName()
@Nullable public java.lang.String getDescription()
@Nullable public java.net.URI getStillImageUri()
public boolean isOwned()
public boolean isRented()
@Nullable public java.util.UUID getDownloadId()
public void setDownloadId(@Nullable java.util.UUID downloadId)
Sets the globally unique identifier to the local copy of this video, if any. This method exists so that globally unique identifier can be accessed conveniently from the associated video object.
This method can be called only by methods within the SDK that have explicit permission.
downloadId
- null if there is no local copy of the video, otherwise the globally
unique identifier.java.lang.UnsupportedOperationException
- if the caller is not permitted to call this method.@Nullable public byte[] getOfflinePlaybackLicenseKey()
public void setOfflinePlaybackLicenseKey(@Nullable 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 from the associated video object. Setting or clearing the license key set identifier directly using 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.
licenseKeySetId
- null if the video has no offline playback license, otherwise the
license key identifier.java.lang.UnsupportedOperationException
- if the caller is not permitted to call this method.@Nullable public java.util.Date getLicenseExpiryDate()
public void setLicenseExpiryDate(@Nullable java.util.Date expiryDate)
Sets the UTC date and time when the offline playback license for this video is expected to expire. Please note that changing this value here will not change the actual license expiry date. This method exists so that license expiry date can be accessed conveniently from the associated video object.
This method can be called only by methods within the SDK that have explicit permission.
expiryDate
- null if the video has no offline playback license, otherwise the date.java.lang.UnsupportedOperationException
- if the caller is not permitted to call this method.public boolean isOfflineCopy()
Source.isLocal()
public int describeContents()
describeContents
in interface android.os.Parcelable
public void writeToParcel(android.os.Parcel parcel, int i)
writeToParcel
in interface android.os.Parcelable