FakeMediaSourceFactory


@UnstableApi
class FakeMediaSourceFactory : MediaSourceFactory


Fake MediaSourceFactory that creates a FakeMediaSource.

Summary

Constants

const Any!

The window UID used by media sources that are created by the factory.

Public constructors

Public functions

MediaSource!

Creates a new MediaSource with the specified MediaItem.

IntArray<Int>!

Returns the content types supported by media sources created by this factory.

MediaSourceFactory!
setDrmSessionManagerProvider(
    drmSessionManagerProvider: DrmSessionManagerProvider!
)

Sets the DrmSessionManagerProvider used to obtain a DrmSessionManager for a MediaItem.

MediaSourceFactory!
setLoadErrorHandlingPolicy(
    loadErrorHandlingPolicy: LoadErrorHandlingPolicy!
)

Sets an optional LoadErrorHandlingPolicy.

Inherited functions

From androidx.media3.exoplayer.source.MediaSource.Factory
MediaSource.Factory!
@UnstableApi
experimentalParseSubtitlesDuringExtraction(
    parseSubtitlesDuringExtraction: Boolean
)

This function is deprecated.

This method (and all support for 'legacy' subtitle decoding during rendering) will be removed in a future release.

MediaSource.Factory!

Sets the CmcdConfiguration.Factory used to obtain a CmcdConfiguration for a MediaItem.

MediaSource.Factory!

Sets the SubtitleParser.Factory to be used for parsing subtitles during extraction.

Constants

DEFAULT_WINDOW_UID

const val DEFAULT_WINDOW_UIDAny!

The window UID used by media sources that are created by the factory.

Public constructors

FakeMediaSourceFactory

FakeMediaSourceFactory()

Public functions

createMediaSource

fun createMediaSource(mediaItem: MediaItem!): MediaSource!

Creates a new MediaSource with the specified MediaItem.

Parameters
mediaItem: MediaItem!

The media item to play.

Returns
MediaSource!

The new media source.

getSupportedTypes

@C.ContentType
fun getSupportedTypes(): IntArray<Int>!

Returns the content types supported by media sources created by this factory.

setDrmSessionManagerProvider

fun setDrmSessionManagerProvider(
    drmSessionManagerProvider: DrmSessionManagerProvider!
): MediaSourceFactory!

Sets the DrmSessionManagerProvider used to obtain a DrmSessionManager for a MediaItem.

Returns
MediaSourceFactory!

This factory, for convenience.

setLoadErrorHandlingPolicy

fun setLoadErrorHandlingPolicy(
    loadErrorHandlingPolicy: LoadErrorHandlingPolicy!
): MediaSourceFactory!

Sets an optional LoadErrorHandlingPolicy.

Returns
MediaSourceFactory!

This factory, for convenience.

Public properties