Class SourceDescription
-
- All Implemented Interfaces:
public class SourceDescription
A Source Description.
- This contains the settings to be applied for a source.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description public class
SourceDescription.Builder
The builder for SourceDescription.
-
Field Summary
Fields Modifier and Type Field Description public final List<TypedSource>
sources
public final List<AdDescription>
ads
public final List<TextTrackDescription>
textTracks
public final String
poster
public final MetadataDescription
metadata
public final String
timeServer
-
Constructor Summary
Constructors Constructor Description SourceDescription(List<TypedSource> sources, List<AdDescription> ads, List<TextTrackDescription> textTracks, String poster, MetadataDescription metadata, String timeServer)
-
Method Summary
Modifier and Type Method Description List<TypedSource>
getSources()
List of TypedSources that represent the available sources in this SourceDescription. List<AdDescription>
getAds()
List of AdDescriptions of the source. List<TextTrackDescription>
getTextTracks()
List of side-loaded text tracks of the source. String
getPoster()
The poster image url of this source description. MetadataDescription
getMetadata()
The MetadataDescription for this source description. String
getTimeServer()
Returns the URL of the time server. static SourceDescription
replaceAds(SourceDescription originalSource, List<AdDescription> ads)
static SourceDescription
replaceSources(SourceDescription source, List<TypedSource> sources)
boolean
equals(Object o)
int
hashCode()
-
-
Constructor Detail
-
SourceDescription
SourceDescription(List<TypedSource> sources, List<AdDescription> ads, List<TextTrackDescription> textTracks, String poster, MetadataDescription metadata, String timeServer)
-
-
Method Detail
-
getSources
@NonNull() List<TypedSource> getSources()
List of TypedSources that represent the available sources in this SourceDescription.
- The first element of the list will initially be used as the player’s source.
- When that source is unavailable, the player will fall back to the other elements of this list.
- Returns:
Unmodifiable list of the TypedSources which are contained in this SourceDescription. (NonNull)
-
getAds
@NonNull() List<AdDescription> getAds()
List of AdDescriptions of the source.
- All valid and supported advertisement files will be cued for playback in the player following the provided advertisement specification.
- Each ad in the list should be described as an AdDescription.
- Returns:
Unmodifiable list of the AdDescriptions which are contained in this SourceDescription. (NonNull)
-
getTextTracks
@NonNull() List<TextTrackDescription> getTextTracks()
List of side-loaded text tracks of the source.
- All valid tracks will be available during playback.
- Each text track should be described as a TextTrackDescription.
- Returns:
Unmodifiable list of the TextTrackDescriptions which are contained in this SourceDescription. (NonNull)
-
getPoster
@Nullable() String getPoster()
The poster image url of this source description. (Nullable)
- A placeholder for the content between the time that the content has loaded and the user presses play.
-
getMetadata
@Nullable() MetadataDescription getMetadata()
The MetadataDescription for this source description.
- Returns:
The metadata for this source description. (Nullable)
-
getTimeServer
@Nullable() String getTimeServer()
Returns the URL of the time server. (Nullable)
- The time server should return time in ISO-8601 format.
- Applies for all sources.
-
replaceAds
static SourceDescription replaceAds(SourceDescription originalSource, List<AdDescription> ads)
-
replaceSources
static SourceDescription replaceSources(SourceDescription source, List<TypedSource> sources)
-
hashCode
int hashCode()
-
-
-
-