Skip to content

nvvi9/YTStream

Repository files navigation

YTStream

Platform API Download

Android library for extracting YouTube video streaming URLs.

Usage

This library can be used to extract both streaming URLs and video details (title, description, thumbnails, etc.), or just video details (takes less time). Methods return Flow or Observable.

Kotlin Flow

val ytStream = YTStream()

ytStream.extractVideoData(*videoIdArray)
    .flowOn(Dispatchers.IO)
    .collect {
        doSomething(it)
    }

RxJava Observable

YTStream ytStream = new YTStream();

ytStream.extractVideoDetailsObservable(videoIdArray)
    .observeOn(Schedulers.io())
    .subscribe(videoData -> {
        doSomething(videoData);
    });

Installation

Gradle

repositories {
    ...
    maven { url 'https://dl.bintray.com/nvvi9/maven' }
}

dependencies {
    implementation 'com.nvvi9:ytstream:0.1.1'
}

Maven

<dependency>
    <groupId>com.nvvi9</groupId>
    <artifactId>ytstream</artifactId>
    <version>0.1.1</version>
    <type>pom</type>
</dependency>