Package com.lagradost.cloudstream3.ui.player

Types

AbstractPlayerFragment
Link copied to clipboard
abstract class AbstractPlayerFragment(player: IPlayer) : Fragment
AudioTrack
Link copied to clipboard
data class AudioTrack(id: String?, label: String?, language: String?) : Track
BasicLink
Link copied to clipboard
data class BasicLink(url: String, name: String?)
Used to open the player more easily with the LinkGenerator
CS3IPlayer
Link copied to clipboard
class CS3IPlayer : IPlayer
CSPlayerEvent
Link copied to clipboard
enum CSPlayerEvent : Enum<CSPlayerEvent>
CSPlayerLoading
Link copied to clipboard
enum CSPlayerLoading : Enum<CSPlayerLoading>
CurrentTracks
Link copied to clipboard
data class CurrentTracks(currentVideoTrack: VideoTrack?, currentAudioTrack: AudioTrack?, allVideoTracks: List<VideoTrack>, allAudioTracks: List<AudioTrack>)
CustomDecoder
Link copied to clipboard
class CustomDecoder(fallbackFormat: Format?) : SubtitleDecoder
CustomSubtitleDecoderFactory
Link copied to clipboard
class CustomSubtitleDecoderFactory : SubtitleDecoderFactory
See https://github.com/google/ExoPlayer/blob/release-v2/library/core/src/main/java/com/google/android/exoplayer2/text/SubtitleDecoderFactory.
CustomTextRenderer
Link copied to clipboard
class CustomTextRenderer(offset: Long, output: TextOutput?, outputLooper: Looper?, decoderFactory: SubtitleDecoderFactory) : NonFinalTextRenderer
DownloadedPlayerActivity
Link copied to clipboard
class DownloadedPlayerActivity : AppCompatActivity
DownloadFileGenerator
Link copied to clipboard
class DownloadFileGenerator(episodes: List<ExtractorUri>, currentIndex: Int) : IGenerator
EmbeddedSubtitlesFetchedEvent
Link copied to clipboard
data class EmbeddedSubtitlesFetchedEvent(tracks: List<SubtitleData>, source: PlayerEventSource) : PlayerEvent
Event from player to give all embedded subtitles
EpisodeSeekEvent
Link copied to clipboard
data class EpisodeSeekEvent(offset: Int, source: PlayerEventSource) : PlayerEvent
this is used by the player to load the next or prev episode
ErrorEvent
Link copied to clipboard
data class ErrorEvent(error: Throwable, source: PlayerEventSource) : PlayerEvent
player error when rendering or misc, used to display toast or log
ExtractorLinkGenerator
Link copied to clipboard
class ExtractorLinkGenerator(links: List<ExtractorLink>, subtitles: List<SubtitleData>) : IGenerator
FullScreenPlayer
Link copied to clipboard
open class FullScreenPlayer : AbstractPlayerFragment
GeneratorPlayer
Link copied to clipboard
class GeneratorPlayer : FullScreenPlayer
IGenerator
Link copied to clipboard
interface IGenerator
InvalidFileException
Link copied to clipboard
class InvalidFileException(msg: String) : Exception
IPlayer
Link copied to clipboard
interface IPlayer
Abstract Exoplayer logic, can be expanded to other players
LinkGenerator
Link copied to clipboard
class LinkGenerator(links: List<BasicLink>, extract: Boolean, referer: String?, isM3u8: Boolean?) : IGenerator
LoadType
Link copied to clipboard
enum LoadType : Enum<LoadType>
NonFinalTextRenderer
Link copied to clipboard
open class NonFinalTextRenderer : BaseRenderer, Handler.Callback
A renderer for text.
PauseEvent
Link copied to clipboard
data class PauseEvent(source: PlayerEventSource) : PlayerEvent
Pause event, separate from StatusEvent
PlayerAttachedEvent
Link copied to clipboard
data class PlayerAttachedEvent(player: Any?, source: PlayerEventSource) : PlayerEvent
on attach player to view
PlayerEvent
Link copied to clipboard
abstract class PlayerEvent
PlayerEventSource
Link copied to clipboard
enum PlayerEventSource : Enum<PlayerEventSource>
PlayerEventType
Link copied to clipboard
enum PlayerEventType : Enum<PlayerEventType>
PlayerGeneratorViewModel
Link copied to clipboard
class PlayerGeneratorViewModel : ViewModel
PlayerPipHelper
Link copied to clipboard
class PlayerPipHelper
PlayerResize
Link copied to clipboard
enum PlayerResize : Enum<PlayerResize>
PlayerSubtitleHelper
Link copied to clipboard
class PlayerSubtitleHelper
PlayEvent
Link copied to clipboard
data class PlayEvent(source: PlayerEventSource) : PlayerEvent
Play event, separate from StatusEvent
PositionEvent
Link copied to clipboard
data class PositionEvent(source: PlayerEventSource, fromMs: Long, toMs: Long, durationMs: Long) : PlayerEvent
this is used to update UI based of the current time, using requestedListeningPercentages as well as saving time
RepoLinkGenerator
Link copied to clipboard
class RepoLinkGenerator(episodes: List<ResultEpisode>, currentIndex: Int, page: LoadResponse?) : IGenerator
RequestAudioFocusEvent
Link copied to clipboard
data class RequestAudioFocusEvent(source: PlayerEventSource) : PlayerEvent
current player starts, asking for all other programs to shut the fuck up
ResizedEvent
Link copied to clipboard
data class ResizedEvent(height: Int, width: Int, source: PlayerEventSource) : PlayerEvent
Event when the video is resized aka changed resolution or mirror
SSLTrustManager
Link copied to clipboard
class SSLTrustManager : X509TrustManager
StatusEvent
Link copied to clipboard
data class StatusEvent(wasPlaying: CSPlayerLoading, isPlaying: CSPlayerLoading, source: PlayerEventSource) : PlayerEvent
Event when the player status update, along with the previous status (for animation)
SubtitleData
Link copied to clipboard
data class SubtitleData(name: String, url: String, origin: SubtitleOrigin, mimeType: String, headers: Map<String, String>)
SubtitleOrigin
Link copied to clipboard
enum SubtitleOrigin : Enum<SubtitleOrigin>
SubtitleStatus
Link copied to clipboard
enum SubtitleStatus : Enum<SubtitleStatus>
SubtitlesUpdatedEvent
Link copied to clipboard
data class SubtitlesUpdatedEvent(source: PlayerEventSource) : PlayerEvent
Event from player to inform that subtitles have updated in some way
TimestampInvokedEvent
Link copied to clipboard
data class TimestampInvokedEvent(timestamp: EpisodeSkip.SkipStamp, source: PlayerEventSource) : PlayerEvent
Event when timestamps appear, null when it should disappear
TimestampSkippedEvent
Link copied to clipboard
data class TimestampSkippedEvent(timestamp: EpisodeSkip.SkipStamp, source: PlayerEventSource) : PlayerEvent
Event for when a chapter is skipped, aka when event is handled (or for future use when skip automatically ads/sponsor)
Track
Link copied to clipboard
interface Track
TracksChangedEvent
Link copied to clipboard
data class TracksChangedEvent(source: PlayerEventSource) : PlayerEvent
Event when tracks are changed, used for UI changes
VideoEndedEvent
Link copied to clipboard
data class VideoEndedEvent(source: PlayerEventSource) : PlayerEvent
Event when the player video has ended, up to the settings on what to do when that happens
VideoTrack
Link copied to clipboard
data class VideoTrack(id: String?, label: String?, language: String?, width: Int?, height: Int?) : Track

Functions

toSet
Link copied to clipboard
fun LoadType.toSet(): Set<ExtractorLinkType>

Properties

ACTION_MEDIA_CONTROL
Link copied to clipboard
const val ACTION_MEDIA_CONTROL: String
DOUBLE_TAB_MAXIMUM_HOLD_TIME
Link copied to clipboard
const val DOUBLE_TAB_MAXIMUM_HOLD_TIME: Long = 200L
DOUBLE_TAB_MINIMUM_TIME_BETWEEN
Link copied to clipboard
const val DOUBLE_TAB_MINIMUM_TIME_BETWEEN: Long = 200L
DOUBLE_TAB_PAUSE_PERCENTAGE
Link copied to clipboard
const val DOUBLE_TAB_PAUSE_PERCENTAGE: Double = 0.15
DTAG
Link copied to clipboard
const val DTAG: String
EXTRA_CONTROL_TYPE
Link copied to clipboard
const val EXTRA_CONTROL_TYPE: String
HORIZONTAL_MULTIPLIER
Link copied to clipboard
const val HORIZONTAL_MULTIPLIER: Float = 2.0f
MINIMUM_HORIZONTAL_SWIPE
Link copied to clipboard
const val MINIMUM_HORIZONTAL_SWIPE: Float = 2.0f
MINIMUM_SEEK_TIME
Link copied to clipboard
const val MINIMUM_SEEK_TIME: Long = 7000L
MINIMUM_VERTICAL_SWIPE
Link copied to clipboard
const val MINIMUM_VERTICAL_SWIPE: Float = 2.0f
NEXT_WATCH_EPISODE_PERCENTAGE
Link copied to clipboard
const val NEXT_WATCH_EPISODE_PERCENTAGE: Int = 90
PLAYBACK_SPEED
Link copied to clipboard
const val PLAYBACK_SPEED: String
PLAYBACK_SPEED_KEY
Link copied to clipboard
const val PLAYBACK_SPEED_KEY: String
PREFERRED_AUDIO_LANGUAGE_KEY
Link copied to clipboard
const val PREFERRED_AUDIO_LANGUAGE_KEY: String
PREFERRED_SUBS_KEY
Link copied to clipboard
const val PREFERRED_SUBS_KEY: String
PRELOAD_NEXT_EPISODE_PERCENTAGE
Link copied to clipboard
const val PRELOAD_NEXT_EPISODE_PERCENTAGE: Int = 80
RESIZE_MODE_KEY
Link copied to clipboard
const val RESIZE_MODE_KEY: String
SKIP_OP_VIDEO_PERCENTAGE
Link copied to clipboard
const val SKIP_OP_VIDEO_PERCENTAGE: Int = 50
STATE_PLAYER_FULLSCREEN
Link copied to clipboard
const val STATE_PLAYER_FULLSCREEN: String
STATE_PLAYER_PLAYING
Link copied to clipboard
const val STATE_PLAYER_PLAYING: String
STATE_RESUME_POSITION
Link copied to clipboard
const val STATE_RESUME_POSITION: String
STATE_RESUME_WINDOW
Link copied to clipboard
const val STATE_RESUME_WINDOW: String
TAG
Link copied to clipboard
const val TAG: String
toleranceAfterUs
Link copied to clipboard
const val toleranceAfterUs: Long = 300_000L
toleranceAfterUs – The maximum time that the actual position seeked to may exceed the requested seek position, in microseconds.
toleranceBeforeUs
Link copied to clipboard
const val toleranceBeforeUs: Long = 300_000L
toleranceBeforeUs – The maximum time that the actual position seeked to may precede the requested seek position, in microseconds.
UPDATE_SYNC_PROGRESS_PERCENTAGE
Link copied to clipboard
const val UPDATE_SYNC_PROGRESS_PERCENTAGE: Int = 80
VERTICAL_MULTIPLIER
Link copied to clipboard
const val VERTICAL_MULTIPLIER: Float = 2.0f