Package-level declarations

Types

Link copied to clipboard
abstract class AbstractPlayerFragment(val player: IPlayer = CS3IPlayer())
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 currentTextTracks: List<TextTrack>, val allVideoTracks: List<VideoTrack>, val allAudioTracks: List<AudioTrack>, val allTextTracks: List<TextTrack>)
Link copied to clipboard
class CustomDecoder(fallbackFormat: <Error class: unknown class>?)
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 DelegatingSubtitleDecoder(name: String, parser: <Error class: unknown class>)

We need to convert the newer SubtitleParser to an older SubtitleDecoder

Link copied to clipboard
Link copied to clipboard
data class DownloadEvent(val downloadedBytes: Long, val totalBytes: Long, val downloadSpeed: Long, val connections: Int?, val source: PlayerEventSource = PlayerEventSource.Player) : PlayerEvent

Used for torrent to pre-download a video before playing it

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
data class ExtractorUri(val uri: Uri, val name: String, val basePath: String? = null, val relativePath: String? = null, val displayName: String? = null, val id: Int? = null, val parentId: Int? = null, val episode: Int? = null, val season: Int? = null, val headerName: String? = null, val tvType: TvType? = null)
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
class OutlineSpan(@Px val outlineWidth: Float) : CharacterStyle
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 SubtitleCue(val startTimeMs: Long, val durationMs: Long, val text: List<String>)
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
class SubtitleOffsetItemAdapter(currentTimeMs: Long, val items: MutableList<SubtitleCue>, val clickCallback: (SubtitleCue) -> Unit) : AppContextUtils.DiffAdapter<SubtitleCue>
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 TextTrack(val id: String?, val label: String?, val language: String?, val mimeType: String?) : Track
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
object Torrent
Link copied to clipboard
data class TorrentRequest(val request: ExtractorLink, val requestId: Long, val data: ExtractorUri)
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
Link copied to clipboard
const val HORIZONTAL_MULTIPLIER: Float = 2.0f
Link copied to clipboard
Link copied to clipboard
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