Package-level declarations

Types

Link copied to clipboard
abstract class AbstractPlayerFragment(val player: IPlayer = CS3IPlayer()) : Fragment
Link copied to clipboard
data class AudioTrack(val id: String?, val label: String?, val language: String?) : Track
Link copied to clipboard
data class BasicLink(val url: String, val name: String? = null)

Used to open the player more easily with the LinkGenerator

Link copied to clipboard
data class Cache(val linkCache: MutableSet<ExtractorLink>, val subtitleCache: MutableSet<SubtitleData>, var lastCachedTimestamp: Long = unixTime)
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
data class CurrentTracks(val currentVideoTrack: VideoTrack?, val currentAudioTrack: AudioTrack?, val allVideoTracks: List<VideoTrack>, val allAudioTracks: List<AudioTrack>)
Link copied to clipboard
Link copied to clipboard

See https://github.com/google/ExoPlayer/blob/release-v2/library/core/src/main/java/com/google/android/exoplayer2/text/SubtitleDecoderFactory.java

Link copied to clipboard
class CustomTextRenderer(offset: Long, output: TextOutput?, outputLooper: Looper?, decoderFactory: SubtitleDecoderFactory = SubtitleDecoderFactory.DEFAULT) : NonFinalTextRenderer
Link copied to clipboard
class DownloadFileGenerator(episodes: List<ExtractorUri>, currentIndex: Int = 0) : IGenerator
Link copied to clipboard
data class EmbeddedSubtitlesFetchedEvent(val tracks: List<SubtitleData>, val source: PlayerEventSource = PlayerEventSource.Player) : PlayerEvent

Event from player to give all embedded subtitles

Link copied to clipboard
data class EpisodeSeekEvent(val offset: Int, val source: PlayerEventSource = PlayerEventSource.Player) : PlayerEvent

this is used by the player to load the next or prev episode

Link copied to clipboard
data class ErrorEvent(val error: Throwable, val source: PlayerEventSource = PlayerEventSource.Player) : PlayerEvent

player error when rendering or misc, used to display toast or log

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
interface IGenerator
Link copied to clipboard
data class ImageParams(val width: Int, val height: Int)
Link copied to clipboard
Link copied to clipboard
interface IPlayer

Abstract Exoplayer logic, can be expanded to other players

Link copied to clipboard
Link copied to clipboard
class LinkGenerator(links: List<BasicLink>, extract: Boolean = true, referer: String? = null, isM3u8: Boolean? = null) : IGenerator
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
data class PauseEvent(val source: PlayerEventSource = PlayerEventSource.Player) : PlayerEvent

Pause event, separate from StatusEvent

Link copied to clipboard
data class PlayerAttachedEvent(val player: Any?, val source: PlayerEventSource = PlayerEventSource.Player) : PlayerEvent

on attach player to view

Link copied to clipboard
abstract class PlayerEvent
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
data class PlayEvent(val source: PlayerEventSource = PlayerEventSource.Player) : PlayerEvent

Play event, separate from StatusEvent

Link copied to clipboard
data class PositionEvent(val source: PlayerEventSource, val fromMs: Long, val toMs: Long, val durationMs: Long) : PlayerEvent

this is used to update UI based of the current time, using requestedListeningPercentages as well as saving time

Link copied to clipboard

PreviewGenerator that hides the implementation details of the sub generators that is used, used for source switch cache

Link copied to clipboard
class RepoLinkGenerator(episodes: List<ResultEpisode>, currentIndex: Int = 0, val page: LoadResponse? = null) : IGenerator
Link copied to clipboard
data class RequestAudioFocusEvent(val source: PlayerEventSource = PlayerEventSource.Player) : PlayerEvent

current player starts, asking for all other programs to shut the fuck up

Link copied to clipboard
data class ResizedEvent(val height: Int, val width: Int, val source: PlayerEventSource = PlayerEventSource.Player) : PlayerEvent

Event when the video is resized aka changed resolution or mirror

Link copied to clipboard
Link copied to clipboard
data class StatusEvent(val wasPlaying: CSPlayerLoading, val isPlaying: CSPlayerLoading, val source: PlayerEventSource = PlayerEventSource.Player) : PlayerEvent

Event when the player status update, along with the previous status (for animation)

Link copied to clipboard
data class SubtitleData(val name: String, val url: String, val origin: SubtitleOrigin, val mimeType: String, val headers: Map<String, String>, val languageCode: String?)
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
data class SubtitlesUpdatedEvent(val source: PlayerEventSource = PlayerEventSource.Player) : PlayerEvent

Event from player to inform that subtitles have updated in some way

Link copied to clipboard
data class TimestampInvokedEvent(val timestamp: EpisodeSkip.SkipStamp, val source: PlayerEventSource = PlayerEventSource.Player) : PlayerEvent

Event when timestamps appear, null when it should disappear

Link copied to clipboard
data class TimestampSkippedEvent(val timestamp: EpisodeSkip.SkipStamp, val source: PlayerEventSource = PlayerEventSource.Player) : PlayerEvent

Event for when a chapter is skipped, aka when event is handled (or for future use when skip automatically ads/sponsor)

Link copied to clipboard
interface Track
Link copied to clipboard
data class TracksChangedEvent(val source: PlayerEventSource = PlayerEventSource.Player) : PlayerEvent

Event when tracks are changed, used for UI changes

Link copied to clipboard
data class VideoEndedEvent(val source: PlayerEventSource = PlayerEventSource.Player) : PlayerEvent

Event when the player video has ended, up to the settings on what to do when that happens

Link copied to clipboard
data class VideoTrack(val id: String?, val label: String?, val language: String?, val width: Int?, val height: Int?) : Track

Properties

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
const val DTAG: String
Link copied to clipboard
Link copied to clipboard
const val HORIZONTAL_MULTIPLIER: Float = 2.0f
Link copied to clipboard
const val MAX_LOD: Int = 6
Link copied to clipboard
const val MIN_LOD: Int = 3
Link copied to clipboard
Link copied to clipboard
const val MINIMUM_SEEK_TIME: Long = 7000
Link copied to clipboard
const val MINIMUM_VERTICAL_SWIPE: Float = 2.0f
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
const val TAG: String
Link copied to clipboard

toleranceAfterUs – The maximum time that the actual position seeked to may exceed the requested seek position, in microseconds. Must be non-negative.

Link copied to clipboard

toleranceBeforeUs – The maximum time that the actual position seeked to may precede the requested seek position, in microseconds. Must be non-negative.

Link copied to clipboard
Link copied to clipboard
const val VERTICAL_MULTIPLIER: Float = 2.0f

Functions

Link copied to clipboard