public class Source extends SourceAwareMetadataObject
Modifier and Type | Class and Description |
---|---|
static class |
Source.Fields
Provides the list of known field names that can appear in the properties Map.
|
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
EXT_X_VERSION_4
The constant HLS EXT_X_VERSION_4.
|
static java.lang.String |
EXT_X_VERSION_5
The constant HLS EXT_X_VERSION_5.
|
properties, TAG
Constructor and Description |
---|
Source(java.util.Map<java.lang.String,java.lang.Object> properties) |
Source(java.lang.String url)
Initializes a Source with a single URL property.
|
Source(java.lang.String url,
DeliveryType deliveryType)
Initializes a Source with a single URL property with the given DeliveryType.
|
Modifier and Type | Method and Description |
---|---|
java.lang.Integer |
getBitRate()
Convenience getter to retrieve the property with a key of BIT_RATE
|
static java.lang.String |
getSourceUrl(Source source)
Gets the URL of the source.
|
java.lang.String |
getUrl()
Convenience getter to retrieve the property with the
Source.Fields.URL key |
boolean |
hasKeySystem(java.lang.String keySystem)
Checks if the source has the specified key system.
|
boolean |
isLocal()
Checks if the source points to local media.
|
java.lang.String |
toString() |
getDeliveryType, initializeDeliveryType
getIntegerProperty, getIntegerProperty, getProperties, getStringProperty, getStringProperty
public static final java.lang.String EXT_X_VERSION_5
public static final java.lang.String EXT_X_VERSION_4
public Source(java.util.Map<java.lang.String,java.lang.Object> properties)
public Source(java.lang.String url)
url
- the URL for this Source assetpublic Source(java.lang.String url, DeliveryType deliveryType)
url
- the URL for this Source assetdeliveryType
- the DeliveryType for the Source assetpublic boolean isLocal()
public java.lang.String getUrl()
Source.Fields.URL
keypublic java.lang.Integer getBitRate()
public boolean hasKeySystem(@NonNull java.lang.String keySystem)
keySystem
- the unique identifier of the key systems, such as Source.Fields.WIDEVINE_KEY_SYSTEM
.@Nullable public static java.lang.String getSourceUrl(@Nullable Source source)
source
- the source.public java.lang.String toString()
toString
in class MetadataObject