public final class

SilenceMediaSource.Factory

extends java.lang.Object

 java.lang.Object

↳androidx.media3.exoplayer.source.SilenceMediaSource.Factory

Overview

Factory for SilenceMediaSources.

Summary

Constructors
publicFactory()

Methods
public SilenceMediaSourcecreateMediaSource()

Creates a new SilenceMediaSource.

public SilenceMediaSource.FactorysetDurationUs(long durationUs)

Sets the duration of the silent audio.

public SilenceMediaSource.FactorysetTag(java.lang.Object tag)

Sets a tag for the media source which will be published in the Timeline of the source as .

from java.lang.Objectclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructors

public Factory()

Methods

public SilenceMediaSource.Factory setDurationUs(long durationUs)

Sets the duration of the silent audio. The value needs to be a positive value.

Parameters:

durationUs: The duration of silent audio to output, in microseconds.

Returns:

This factory, for convenience.

public SilenceMediaSource.Factory setTag(java.lang.Object tag)

Sets a tag for the media source which will be published in the Timeline of the source as .

Parameters:

tag: A tag for the media source.

Returns:

This factory, for convenience.

public SilenceMediaSource createMediaSource()

Creates a new SilenceMediaSource.