Builder

class Builder(val uploadUri: Uri, val videoFile: File)

Builds instances of MuxUpload.

If you wish for fine-grained control over the upload process, some configuration is available.

For example:

// Adapt to your upload to current network conditions
val chunkSize = if (/* onWifi */) {
16 * 1024 * 1024 // 16M, bigger chunks go faster
} else {
8 * 1024 * 1024 // 8M, smaller chunks are more reliable
}

val upload = MuxUpload.Builder(myUploadUrl, myInputFile)
.chunkSize(chunkSize) // Mux's default is 8Mb
.retriesPerChunk(5) // Mux's default is 3
.build()

Parameters

uploadUri

the URL obtained from the Direct video up

videoFile

a File that represents the video file you want to upload

Constructors

Link copied to clipboard
constructor(uploadUri: String, videoFile: File)

Create a new Builder with the specified input file and upload URL

constructor(uploadUri: Uri, videoFile: File)

Functions

Link copied to clipboard

Creates a new MuxUpload with the given configuration.

Link copied to clipboard

The Upload SDK will upload your file in smaller chunks, which can be more reliable in adverse network conditions.

Link copied to clipboard

Allow Mux to manage and remember the state of this upload

Link copied to clipboard

Allows you to opt out of Mux's performance analytics tracking. We track metrics related to the overall performance and reliability of your upload, in order to make our SDK better.

Link copied to clipboard

The Upload SDK will upload your file in smaller chunks, which can be more reliable in adverse network conditions. Each chunk can be retried individually, up to the given number of times

Link copied to clipboard

If requested, the Upload SDK will try to standardize the input file in order to optimize it for use with Mux Video

Properties

Link copied to clipboard
Link copied to clipboard