play_circleFeatures quizFAQ volunteer_activismDonate new_releasesWhat's New folder_openOpen source translateHelp translate

WorldPlay Extractor

Kotlin/JVM stream extraction pipeline. Search, navigate, decrypt, and play stream URLs with no browser runtimes.

Installation

Include the library dependency directly in your Kotlin/JVM build script. Artifacts are hosted on Maven Central.

Gradle (Kotlin DSL)

build.gradle.kts
dependencies {
    implementation("io.gitlab.projectworldplay:worldplayextractor:1.1.4")
}

Gradle (Groovy DSL)

build.gradle
dependencies {
    implementation 'io.gitlab.projectworldplay:worldplayextractor:1.1.4'
}

How it works

WorldPlay Extractor provides a clean interface for extracting media links from public streaming providers. Under the hood, it performs all networking and stream decryption without invoking heavy WebView containers or headless browsers.

Extraction Pipeline

The library queries providers sequentially to locate streams, following a consistent pipeline:

Flow Chart
search query → movie/show result → seasons / episodes / servers → stream URLs + subtitles + headers

Core Concepts

  • Native Decryption: All decryption logic (including Videasy RC4 + AES-256-CBC) runs directly in pure Kotlin cryptographic primitives.
  • Opaque Identifiers: The URLs and IDs returned in models are opaque. Pass them straight to the next step of the pipeline. Do not attempt to parse them.
  • Required Headers: Playback endpoints typically require specific referrer or user-agent cookies. Make sure to feed `StreamInfo.headers` directly to your video player datasource.

Quick Start

Instantiate the extractor, search for a media title, browse available servers, and extract the best stream quality within a coroutine scope.

Quickstart.kt
import kotlinx.coroutines.runBlocking
import okhttp3.OkHttpClient
import org.projectworldplay.extractor.WorldplayExtractor

fun main() = runBlocking {
    val client = OkHttpClient.Builder().build()
    // Configure default provider (ChillProvider)
    val extractor = WorldplayExtractor.withChillProvider(client)

    // Search for content
    val results = extractor.search("123chill", "inception")
    if (results.isEmpty()) return@runBlocking

    val movie = results.first()
    
    // Retrieve servers and select streams
    val servers = extractor.getMovieServers("123chill", movie.url)
    val streamInfo = extractor.getStream("123chill", servers.first().id)

    val bestStream = streamInfo.bestStream
    println("Playable Stream URL: ${bestStream?.url}")
    println("Subtitles Available: ${streamInfo.subtitles.size}")
    println("Required Headers:    ${streamInfo.headers}")
}

ExoPlayer / Media3 Integration

To playback the extracted streams in Android, build a media source supplying the required extraction headers:

PlaybackActivity.kt
import androidx.media3.common.MediaItem
import androidx.media3.common.MimeTypes
import androidx.media3.datasource.DefaultDataSource
import androidx.media3.datasource.okhttp.OkHttpDataSource
import androidx.media3.exoplayer.ExoPlayer

// Configure datasource with required referrer/user-agent headers
val httpDataSourceFactory = OkHttpDataSource.Factory(okHttpClient)
    .setDefaultRequestProperties(streamInfo.headers)

val dataSourceFactory = DefaultDataSource.Factory(context, httpDataSourceFactory)

// Build HLS/DASH media item
val mediaItem = MediaItem.Builder()
    .setUri(stream.url)
    .setMimeType(MimeTypes.APPLICATION_M3U8)
    .build()

val player = ExoPlayer.Builder(context).build()
player.setMediaItem(mediaItem)
player.prepare()
player.play()

API Reference

Summary of core suspension methods exposed by `WorldplayExtractor` class.

Method Returns Description
search(providerId, query) List<SearchResult> Search for TV shows or movies.
getSeasons(providerId, showUrl) List<Season> Get seasons for TV shows.
getEpisodes(providerId, seasonId) List<Episode> Get episodes for a season.
getMovieServers(providerId, movieUrl) List<Server> Get streaming servers for a movie.
getServers(providerId, episodeId) List<Server> Get streaming servers for an episode.
getStream(providerId, serverId) StreamInfo Decrypt and retrieve streams, subtitles, and headers.