-
- All Implemented Interfaces:
-
java.io.Serializable
public class Source extends SourceAwareMetadataObject
The Source class is an immutable representation of a specific playable video asset, including the URL or other necessary information required to play the video.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description public final class
Source.Fields
Provides the list of known field names that can appear in the properties Map.
-
Field Summary
Fields Modifier and Type Field Description public final static String
EXT_X_VERSION_5
public final static String
EXT_X_VERSION_4
-
Method Summary
Modifier and Type Method Description boolean
isLocal()
Checks if the source points to local media. String
getUrl()
Convenience getter to retrieve the property with the URL key Integer
getBitRate()
Convenience getter to retrieve the property with a key of BIT_RATE boolean
hasKeySystem(@NonNull() String keySystem)
Checks if the source has the specified key system. Map<String, Object>
getKeySystem(@NonNull() String keySystem)
Returns the specified key system, or an empty Map if the key system can not be found boolean
hasHlseEncryption()
Checks if the source has HLSe encryption. static String
getSourceUrl(@Nullable() Source source)
Gets the URL of the source. String
toString()
-
Methods inherited from class com.brightcove.player.model.SourceAwareMetadataObject
getDeliveryType
-
Methods inherited from class com.brightcove.player.model.MetadataObject
getIntegerProperty, getIntegerProperty, getLongProperty, getProperties, getStringProperty, getStringProperty
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
-
Constructor Detail
-
Source
Source(String url)
Initializes a Source with a single URL property.- Parameters:
url
- the URL for this Source asset
-
Source
Source(String url, DeliveryType deliveryType)
Initializes a Source with a single URL property with the given DeliveryType.- Parameters:
url
- the URL for this Source assetdeliveryType
- the DeliveryType for the Source asset
-
-
Method Detail
-
isLocal
boolean isLocal()
Checks if the source points to local media.
-
getBitRate
Integer getBitRate()
Convenience getter to retrieve the property with a key of BIT_RATE
-
hasKeySystem
boolean hasKeySystem(@NonNull() String keySystem)
Checks if the source has the specified key system.
- Parameters:
keySystem
- the unique identifier of the key systems, such as WIDEVINE_KEY_SYSTEM.
-
getKeySystem
Map<String, Object> getKeySystem(@NonNull() String keySystem)
Returns the specified key system, or an empty Map if the key system can not be found
- Parameters:
keySystem
- the unique identifier of the key systems, such as WIDEVINE_KEY_SYSTEM.
-
hasHlseEncryption
boolean hasHlseEncryption()
Checks if the source has HLSe encryption.
-
getSourceUrl
@Nullable() static String getSourceUrl(@Nullable() Source source)
Gets the URL of the source.
- Parameters:
source
- the source.
-
-
-
-