CS3IPlayer

Constructors

Link copied to clipboard
constructor()

Types

Link copied to clipboard
object Companion
Link copied to clipboard
data class DrmMetadata(val kid: String, val key: String, val uuid: UUID, val kty: String, val keyRequestParameters: HashMap<String, String>)
Link copied to clipboard
data class MediaItemSlice(val mediaItem: <Error class: unknown class>, val durationUs: Long, val drm: CS3IPlayer.DrmMetadata? = null)

This is a way to combine the MediaItem and its duration for the concatenating MediaSource.

Properties

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard

Functions

Link copied to clipboard
open override fun addTimeStamps(timeStamps: List<EpisodeSkip.SkipStamp>)
Link copied to clipboard
fun event(event: PlayerEvent)
Link copied to clipboard
open override fun getAspectRatio(): Rational?

Original video aspect ratio used for PiP mode

Link copied to clipboard
Link copied to clipboard
open override fun getDuration(): Long?

Current player duration in milliseconds

Link copied to clipboard
open override fun getIsPlaying(): Boolean
Link copied to clipboard
open override fun getPlaybackSpeed(): Float
Link copied to clipboard
open override fun getPosition(): Long?

Current player position in milliseconds

Link copied to clipboard
open override fun getPreview(fraction: Float): Bitmap?
Link copied to clipboard
open override fun getSubtitleCues(): List<SubtitleCue>

Get the current subtitle cues, for use with syncing

Link copied to clipboard
open override fun getSubtitleOffset(): Long
Link copied to clipboard
open override fun getVideoTracks(): CurrentTracks
Link copied to clipboard
open override fun handleEvent(event: CSPlayerEvent, source: PlayerEventSource)
Link copied to clipboard
open override fun hasPreview(): Boolean
Link copied to clipboard
open override fun initCallbacks(eventHandler: (PlayerEvent) -> Unit, requestedListeningPercentages: List<Int>?)
Link copied to clipboard
fun initSubtitles(subView: <Error class: unknown class>?, subHolder: FrameLayout?, style: SaveCaptionStyle?)
Link copied to clipboard
open override fun isActive(): Boolean

Get if player is actually used

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

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
open override fun setPlaybackSpeed(speed: Float)
Link copied to clipboard
open override fun setPreferredAudioTrack(trackLanguage: String?, id: String?)

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
open override fun setPreferredSubtitles(subtitle: SubtitleData?): Boolean
Link copied to clipboard
open override fun setSubtitleOffset(offset: Long)
Link copied to clipboard
Link copied to clipboard
fun updatedTime(writePosition: Long? = null, source: PlayerEventSource = PlayerEventSource.Player)
Link copied to clipboard
open override fun updateSubtitleStyle(style: SaveCaptionStyle)