Track

class Track(url: String, extractor: Extractor, title: String?, author: String?, duration: Long, loadId: String)

A track for the Player

See also

Parameters

url

the original URL to access the content from

extractor

An Extractor used to get the streaming URL from

title

Is null if there is no title

author

Is null if there is no author

duration

In milliseconds. Is -1 if no duration was found

Constructors

Link copied to clipboard
fun Track(url: String, extractor: Extractor, title: String?, author: String?, duration: Long, loadId: String)

Functions

Link copied to clipboard
suspend fun getChunk(): Pair<ByteArray, Boolean>

returns a pair containing a chunk and whether it is the last

Link copied to clipboard
suspend fun getStream(): String?

Calls the extractor to get the track's streaming URL

Properties

Link copied to clipboard
var author: String?
Link copied to clipboard
var duration: Long
Link copied to clipboard
var extractor: Extractor
Link copied to clipboard
val loadId: String
Link copied to clipboard
var title: String?
Link copied to clipboard
var url: String