ExoPlayerAssetLoader.Factory


class ExoPlayerAssetLoader.Factory : AssetLoader.Factory


An AssetLoader.Factory for ExoPlayerAssetLoader instances.

Summary

Public constructors

Factory(
    context: Context!,
    decoderFactory: Codec.DecoderFactory!,
    clock: Clock!
)

Creates an instance using a DefaultMediaSourceFactory.

Factory(
    context: Context!,
    decoderFactory: Codec.DecoderFactory!,
    clock: Clock!,
    mediaSourceFactory: MediaSource.Factory!
)

Creates an instance.

Public functions

AssetLoader!
createAssetLoader(
    editedMediaItem: EditedMediaItem!,
    looper: Looper!,
    listener: AssetLoader.Listener!,
    compositionSettings: AssetLoader.CompositionSettings!
)

Creates an AssetLoader instance.

Public constructors

Factory

Factory(
    context: Context!,
    decoderFactory: Codec.DecoderFactory!,
    clock: Clock!
)

Creates an instance using a DefaultMediaSourceFactory.

Parameters
context: Context!

The Context.

decoderFactory: Codec.DecoderFactory!

The Codec.DecoderFactory to use to decode the samples (if necessary).

clock: Clock!

The Clock to use. It should always be DEFAULT, except for testing.

Factory

Factory(
    context: Context!,
    decoderFactory: Codec.DecoderFactory!,
    clock: Clock!,
    mediaSourceFactory: MediaSource.Factory!
)

Creates an instance.

Parameters
context: Context!

The Context.

decoderFactory: Codec.DecoderFactory!

The Codec.DecoderFactory to use to decode the samples (if necessary).

clock: Clock!

The Clock to use. It should always be DEFAULT, except for testing.

mediaSourceFactory: MediaSource.Factory!

The MediaSource.Factory to use to retrieve the samples to transform.

Public functions

createAssetLoader

fun createAssetLoader(
    editedMediaItem: EditedMediaItem!,
    looper: Looper!,
    listener: AssetLoader.Listener!,
    compositionSettings: AssetLoader.CompositionSettings!
): AssetLoader!

Creates an AssetLoader instance.

Parameters
editedMediaItem: EditedMediaItem!

The EditedMediaItem to load.

looper: Looper!

The Looper that's used to access the AssetLoader after it's been created.

listener: AssetLoader.Listener!

The Listener on which the AssetLoader should notify of events.

compositionSettings: AssetLoader.CompositionSettings!

The CompositionSettings.

Returns
AssetLoader!

An AssetLoader.