mirror of
https://github.com/TeamNewPipe/NewPipe
synced 2024-07-02 01:53:19 +00:00
25 lines
698 B
Java
25 lines
698 B
Java
|
package org.schabi.newpipe.util;
|
||
|
|
||
|
import org.schabi.newpipe.extractor.stream.StreamType;
|
||
|
|
||
|
/**
|
||
|
* Utility class for {@link org.schabi.newpipe.extractor.stream.StreamType}.
|
||
|
*/
|
||
|
public final class StreamTypeUtil {
|
||
|
private StreamTypeUtil() {
|
||
|
// No impl pls
|
||
|
}
|
||
|
|
||
|
/**
|
||
|
* Checks if the streamType is a livestream.
|
||
|
*
|
||
|
* @param streamType
|
||
|
* @return <code>true</code> when the streamType is a
|
||
|
* {@link StreamType#LIVE_STREAM} or {@link StreamType#AUDIO_LIVE_STREAM}
|
||
|
*/
|
||
|
public static boolean isLiveStream(final StreamType streamType) {
|
||
|
return streamType == StreamType.LIVE_STREAM
|
||
|
|| streamType == StreamType.AUDIO_LIVE_STREAM;
|
||
|
}
|
||
|
}
|