IPlayer

interface IPlayer

Abstract Exoplayer logic, can be expanded to other players

Inheritors

Functions

Link copied to clipboard
abstract fun addTimeStamps(timeStamps: List<EpisodeSkip.SkipStamp>)
Link copied to clipboard
abstract fun getAspectRatio(): Rational?

Original video aspect ratio used for PiP mode

Link copied to clipboard
Link copied to clipboard
abstract fun getDuration(): Long?
Link copied to clipboard
abstract fun getIsPlaying(): Boolean
Link copied to clipboard
abstract fun getPlaybackSpeed(): Float
Link copied to clipboard
abstract fun getPosition(): Long?
Link copied to clipboard
abstract fun getPreview(fraction: Float): Bitmap?
Link copied to clipboard
abstract fun getSubtitleOffset(): Long
Link copied to clipboard
Link copied to clipboard
abstract fun handleEvent(event: CSPlayerEvent, source: PlayerEventSource = PlayerEventSource.UI)
Link copied to clipboard
abstract fun hasPreview(): Boolean
Link copied to clipboard
abstract fun initCallbacks(eventHandler: (PlayerEvent) -> Unit, requestedListeningPercentages: List<Int>? = null)
Link copied to clipboard
abstract fun isActive(): Boolean

Get if player is actually used

Link copied to clipboard
abstract fun loadPlayer(context: Context, sameEpisode: Boolean, link: ExtractorLink? = null, data: ExtractorUri? = null, startPosition: Long? = null, subtitles: Set<SubtitleData>, subtitle: SubtitleData?, autoPlay: Boolean? = true, preview: Boolean = true)
Link copied to clipboard
abstract fun onPause()
Link copied to clipboard
abstract fun onResume(context: Context)
Link copied to clipboard
abstract fun onStop()
Link copied to clipboard
abstract fun release()
Link copied to clipboard
abstract fun releaseCallbacks()
Link copied to clipboard
abstract fun reloadPlayer(context: Context)
Link copied to clipboard
abstract fun saveData()
Link copied to clipboard
abstract fun seekTime(time: Long, source: PlayerEventSource = PlayerEventSource.UI)
Link copied to clipboard
abstract fun seekTo(time: Long, source: PlayerEventSource = PlayerEventSource.UI)
Link copied to clipboard
abstract fun setActiveSubtitles(subtitles: Set<SubtitleData>)
Link copied to clipboard
abstract fun setMaxVideoSize(width: Int = Int.MAX_VALUE, height: Int = Int.MAX_VALUE, id: String? = null)

If no parameters are set it'll default to no set size, Specifying the id allows for track overrides to force the player to pick the quality.

Link copied to clipboard
abstract fun setPlaybackSpeed(speed: Float)
Link copied to clipboard
abstract fun setPreferredAudioTrack(trackLanguage: String?, id: String? = null)

If no trackLanguage is set it'll default to first track. Specifying the id allows for track overrides as the language can be identical.

Link copied to clipboard
abstract fun setPreferredSubtitles(subtitle: SubtitleData?): Boolean
Link copied to clipboard
abstract fun setSubtitleOffset(offset: Long)
Link copied to clipboard