CapturingRenderersFactory


@UnstableApi
class CapturingRenderersFactory : RenderersFactory, Dumper.Dumpable


A RenderersFactory that captures interactions with the audio and video instances and ImageOutput instances.

The captured interactions can be used in a test assertion via the Dumper.Dumpable interface.

Summary

Nested types

A factory for Renderer instances that handle TRACK_TYPE_TEXT tracks.

Public constructors

Creates an instance.

Public functions

Array<Renderer!>!
createRenderers(
    eventHandler: Handler!,
    videoRendererEventListener: VideoRendererEventListener!,
    audioRendererEventListener: AudioRendererEventListener!,
    textRendererOutput: TextOutput!,
    metadataRendererOutput: MetadataOutput!
)

Builds the Renderer instances for an ExoPlayer.

Unit
dump(dumper: Dumper!)

Dumps the fields of the object using the dumper.

CapturingRenderersFactory!

Sets the ImageDecoder.Factory used by the ImageRenderer.

CapturingRenderersFactory!

Sets the factory for Renderer instances that handle TRACK_TYPE_TEXT tracks.

Public constructors

CapturingRenderersFactory

CapturingRenderersFactory(context: Context!)

Creates an instance.

Parameters
context: Context!

The Context.

Public functions

createRenderers

fun createRenderers(
    eventHandler: Handler!,
    videoRendererEventListener: VideoRendererEventListener!,
    audioRendererEventListener: AudioRendererEventListener!,
    textRendererOutput: TextOutput!,
    metadataRendererOutput: MetadataOutput!
): Array<Renderer!>!

Builds the Renderer instances for an ExoPlayer.

Parameters
eventHandler: Handler!

A handler to use when invoking event listeners and outputs.

videoRendererEventListener: VideoRendererEventListener!

An event listener for video renderers.

audioRendererEventListener: AudioRendererEventListener!

An event listener for audio renderers.

textRendererOutput: TextOutput!

An output for text renderers.

metadataRendererOutput: MetadataOutput!

An output for metadata renderers.

Returns
Array<Renderer!>!

The instances.

dump

fun dump(dumper: Dumper!): Unit

Dumps the fields of the object using the dumper.

Parameters
dumper: Dumper!

The Dumper to be used to dump fields.

setImageDecoderFactory

fun setImageDecoderFactory(imageDecoderFactory: ImageDecoder.Factory!): CapturingRenderersFactory!

Sets the ImageDecoder.Factory used by the ImageRenderer.

Parameters
imageDecoderFactory: ImageDecoder.Factory!

The ImageDecoder.Factory.

Returns
CapturingRenderersFactory!

This factory, for convenience.

setTextRendererFactory

@CanIgnoreReturnValue
fun setTextRendererFactory(
    textRendererFactory: CapturingRenderersFactory.TextRendererFactory!
): CapturingRenderersFactory!

Sets the factory for Renderer instances that handle TRACK_TYPE_TEXT tracks.

Returns
CapturingRenderersFactory!

This factory, for convenience.