Package-level declarations

Types

Link copied to clipboard
object AppDebug
Link copied to clipboard
object AppUtils
Link copied to clipboard
open class AtomicList<T>(delegate: List<T> = emptyList()) : List<T> , <ERROR CLASS> ERROR CLASS: Symbol not found for SynchronizedObject

A thread-safe list backed by SynchronizedObject.

Link copied to clipboard
class AtomicMutableList<T>(mutableDelegate: MutableList<T> = mutableListOf()) : AtomicList<T> , MutableList<T>
Link copied to clipboard
object Coroutines
Link copied to clipboard

Class holds extracted DRM media info to be passed to the player.

Link copied to clipboard
abstract class ExtractorApi
Link copied to clipboard
open class ExtractorLink(val source: String, val name: String, val url: String, var referer: String, var quality: Int, var headers: Map<String, String> = mapOf(), var extractorData: String? = null, var type: ExtractorLinkType, var audioTracks: List<AudioFile> = emptyList()) : IDownloadableMinimum

Class holds extracted media info to be passed to the player.

Link copied to clipboard
data class ExtractorLinkPlayList(val source: String, val name: String, val playlist: List<PlayListItem>, var referer: String, var quality: Int, var headers: Map<String, String> = mapOf(), var extractorData: String? = null, var type: ExtractorLinkType, var audioTracks: List<AudioFile> = emptyList()) : ExtractorLink

If your site has an unorthodox m3u8-like system where there are multiple smaller videos concatenated use this.

Link copied to clipboard

Metadata about the file type used for downloads and exoplayer hint, if you respond with the wrong one the file will fail to download or be played

Link copied to clipboard
Link copied to clipboard
class JsContext

Stateful JS execution context. Keeps variables alive between eval calls, mimicking the Rhino "scope" object that extensions used to hold on to.

Link copied to clipboard
class JsHunter(hunterJS: String)
Link copied to clipboard
class JsUnpacker(packedJS: String?)
Link copied to clipboard
Link copied to clipboard

backwards api surface

Link copied to clipboard
Link copied to clipboard
data class PlayListItem(val url: String, val durationUs: Long)

For use in the ConcatenatingMediaSource. If features are missing (headers), please report and we can add it.

Link copied to clipboard
Link copied to clipboard
object ShortLink
Link copied to clipboard
Link copied to clipboard

Properties

Link copied to clipboard
val CLEARKEY_DRM_UUID: ERROR CLASS: Unresolved name: fromLongs

Uuid for the ClearKey DRM scheme.

Link copied to clipboard
val CLEARKEY_UUID: ERROR CLASS: Unresolved name: toJavaUuid
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
val PLAYREADY_DRM_UUID: ERROR CLASS: Unresolved name: fromLongs

Uuid for the PlayReady DRM scheme.

Link copied to clipboard
val PLAYREADY_UUID: ERROR CLASS: Unresolved name: toJavaUuid
Link copied to clipboard
val schemaStripRegex: ERROR CLASS: Unresolved name: Regex

Removes https:// and www. To match urls regardless of schema, perhaps Url() can be used?

Link copied to clipboard
val WIDEVINE_DRM_UUID: ERROR CLASS: Unresolved name: fromLongs

Uuid for the Widevine DRM scheme.

Link copied to clipboard
val WIDEVINE_UUID: ERROR CLASS: Unresolved name: toJavaUuid
Link copied to clipboard
expect val workerDispatcher: ERROR CLASS: Symbol not found for CoroutineDispatcher
actual val workerDispatcher: ERROR CLASS: Symbol not found for CoroutineDispatcher

Functions

Link copied to clipboard
suspend fun evalJs(js: String, variable: String? = null, maxExecutionTime: ERROR CLASS: Symbol not found for Duration = JS_DEFAULT_MAX_EXECUTION_TIME, maxInstructions: Long = JS_DEFAULT_MAX_INSTRUCTIONS): Any?

Evaluate js and return its last value, or the value of variable if specified. Convenience wrapper for one-shot evaluations, equivalent to the old rhino.evaluateString(scope, js, ...).

Link copied to clipboard
Link copied to clipboard
fun getAndUnpack(string: String): String
Link copied to clipboard
actual fun getCurrentLocale(): String
expect fun getCurrentLocale(): String

Returns the current locale as an IETF BCP 47 language tag.

actual fun getCurrentLocale(): String
Link copied to clipboard
Link copied to clipboard
fun getPacked(string: String): String?
Link copied to clipboard
suspend fun getPostForm(requestUrl: String, html: String): String?
Link copied to clipboard
fun getQualityFromName(qualityName: String?): Int
Link copied to clipboard
Link copied to clipboard

Convert any JS runtime value to its JavaScript string representation. Mirrors what JS String(value) would produce.

Link copied to clipboard
suspend fun loadExtractor(url: String, subtitleCallback: (SubtitleFile) -> Unit, callback: (ExtractorLink) -> Unit): Boolean

suspend fun loadExtractor(url: String, referer: String? = null, subtitleCallback: (SubtitleFile) -> Unit, callback: (ExtractorLink) -> Unit): Boolean

Tries to load the appropriate extractor based on link, returns true if any extractor is loaded.

Link copied to clipboard
actual fun localizedLanguageName(ietfTag: String, localizedTo: String): String?
expect fun localizedLanguageName(ietfTag: String, localizedTo: String): String?

Returns the display name of ietfTag localized into localizedTo. Returns null if the platform couldn't produce a meaningful name (i.e. it just echoed back the tag or contained a bare language code with parentheses).

actual fun localizedLanguageName(ietfTag: String, localizedTo: String): String?
Link copied to clipboard
suspend fun newDrmExtractorLink(source: String, name: String, url: String, type: ExtractorLinkType? = null, uuid: ERROR CLASS: Symbol not found for Uuid, initializer: suspend DrmExtractorLink.() -> Unit = {}): DrmExtractorLink
suspend fun newDrmExtractorLink(source: String, name: String, url: String, type: ExtractorLinkType? = null, uuid: UUID, initializer: suspend DrmExtractorLink.() -> Unit = { }): DrmExtractorLink
Link copied to clipboard
suspend fun newExtractorLink(source: String, name: String, url: String, type: ExtractorLinkType? = null, initializer: suspend ExtractorLink.() -> Unit = { }): ExtractorLink
Link copied to clipboard
suspend fun newJsContext(initializer: suspend JsContext.() -> Unit = {}): JsContext

Creates a new JsContext, running initializer on it before returning.

Link copied to clipboard
Link copied to clipboard
expect fun runOnMainThreadNative(work: () -> Unit)
Link copied to clipboard
fun Long.toUs(): Long

Converts Seconds to MicroSeconds, multiplication by 1_000_000

Link copied to clipboard
suspend fun unshortenLinkSafe(url: String): String