Class TwitchStreamSegmentUrlProvider
- java.lang.Object
-
- com.sedmelluq.discord.lavaplayer.source.stream.M3uStreamSegmentUrlProvider
-
- com.sedmelluq.discord.lavaplayer.source.twitch.TwitchStreamSegmentUrlProvider
-
public class TwitchStreamSegmentUrlProvider extends M3uStreamSegmentUrlProvider
Provider for Twitch segment URLs from a channel.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class com.sedmelluq.discord.lavaplayer.source.stream.M3uStreamSegmentUrlProvider
M3uStreamSegmentUrlProvider.ChannelStreamInfo, M3uStreamSegmentUrlProvider.SegmentInfo
-
-
Field Summary
-
Fields inherited from class com.sedmelluq.discord.lavaplayer.source.stream.M3uStreamSegmentUrlProvider
baseUrl, lastSegment
-
-
Constructor Summary
Constructors Constructor Description TwitchStreamSegmentUrlProvider(java.lang.String channelName, TwitchStreamAudioSourceManager manager)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected org.apache.http.client.methods.HttpUriRequestcreateSegmentGetRequest(java.lang.String url)protected java.lang.StringfetchSegmentPlaylistUrl(HttpInterface httpInterface)protected java.lang.StringgetQualityFromM3uDirective(ExtendedM3uParser.Line directiveLine)If applicable, extracts the quality information from the M3U directive which describes one stream in the root M3U.-
Methods inherited from class com.sedmelluq.discord.lavaplayer.source.stream.M3uStreamSegmentUrlProvider
chooseNextSegment, createSegmentUrl, getAbsoluteUrl, getNextSegmentStream, getNextSegmentUrl, isAbsoluteUrl, loadChannelStreamsList, loadStreamSegmentsList
-
-
-
-
Constructor Detail
-
TwitchStreamSegmentUrlProvider
public TwitchStreamSegmentUrlProvider(java.lang.String channelName, TwitchStreamAudioSourceManager manager)- Parameters:
channelName- Channel identifier.manager- Twitch source manager.
-
-
Method Detail
-
getQualityFromM3uDirective
protected java.lang.String getQualityFromM3uDirective(ExtendedM3uParser.Line directiveLine)
Description copied from class:M3uStreamSegmentUrlProviderIf applicable, extracts the quality information from the M3U directive which describes one stream in the root M3U.- Specified by:
getQualityFromM3uDirectivein classM3uStreamSegmentUrlProvider- Parameters:
directiveLine- Directive line with arguments.- Returns:
- The quality name extracted from the directive line.
-
fetchSegmentPlaylistUrl
protected java.lang.String fetchSegmentPlaylistUrl(HttpInterface httpInterface) throws java.io.IOException
- Specified by:
fetchSegmentPlaylistUrlin classM3uStreamSegmentUrlProvider- Throws:
java.io.IOException
-
createSegmentGetRequest
protected org.apache.http.client.methods.HttpUriRequest createSegmentGetRequest(java.lang.String url)
- Specified by:
createSegmentGetRequestin classM3uStreamSegmentUrlProvider
-
-