Class SilenceMediaSource

  • All Implemented Interfaces:
    MediaSource

    @Deprecated
    public final class SilenceMediaSource
    extends BaseMediaSource
    Deprecated.
    com.google.android.exoplayer2 is deprecated. Please migrate to androidx.media3 (which contains the same ExoPlayer code). See the migration guide for more details, including a script to help with the migration.
    Media source with a single period consisting of silent raw audio of a given duration.
    • Field Detail

      • MEDIA_ID

        public static final String MEDIA_ID
        Deprecated.
        The media id used by any media item of silence media sources.
        See Also:
        Constant Field Values
    • Constructor Detail

      • SilenceMediaSource

        public SilenceMediaSource​(long durationUs)
        Deprecated.
        Creates a new media source providing silent audio of the given duration.
        Parameters:
        durationUs - The duration of silent audio to output, in microseconds.