Class SourceDescription
-
- All Implemented Interfaces:
public class SourceDescriptionA Source Description.
- This contains the settings to be applied for a source.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description public classSourceDescription.BuilderThe builder for SourceDescription.
-
Field Summary
Fields Modifier and Type Field Description public final List<TypedSource>sourcespublic final List<AdDescription>adspublic final List<TextTrackDescription>textTrackspublic final Stringposterpublic final MetadataDescriptionmetadatapublic final StringtimeServer
-
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. StringgetPoster()The poster image url of this source description. MetadataDescriptiongetMetadata()The MetadataDescription for this source description. StringgetTimeServer()Returns the URL of the time server. static SourceDescriptionreplaceAds(SourceDescription originalSource, List<AdDescription> ads)static SourceDescriptionreplaceSources(SourceDescription source, List<TypedSource> sources)booleanequals(Object o)inthashCode()-
-
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()
-
-
-
-