public static class MediaSource.Builder
extends java.lang.Object
Constructor and Description |
---|
Builder() |
Modifier and Type | Method and Description |
---|---|
MediaSource |
build() |
MediaSource.Builder |
file(java.lang.String file) |
MediaSource.Builder |
httpHeaders(java.util.Map<java.lang.String,java.lang.String> httpHeaders) |
MediaSource.Builder |
isdefault(boolean _default) |
MediaSource.Builder |
label(java.lang.String label) |
MediaSource.Builder |
type(MediaType type) |
public MediaSource.Builder file(java.lang.String file)
file
- URL to the video file, audio file, or live stream of this playlist item source.public MediaSource.Builder label(java.lang.String label)
label
- Label of the media source, displayed in the manual quality selection menu. Set this if you have more than 2 qualities of your video.public MediaSource.Builder isdefault(boolean _default)
_default
- Set this to true for the media source you want to play on startup. If this isn't set for any source, the first one is usedpublic MediaSource.Builder type(MediaType type)
type
- Forces a media type. Only required when a file extension is missing or not recognized (Using .php or certain tokens, for example).public MediaSource.Builder httpHeaders(java.util.Map<java.lang.String,java.lang.String> httpHeaders)
httpHeaders
- HTTP Headers to include with requests for this media file.public MediaSource build()