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 |
|---|
|
Creates an instance. |
FakeMediaSourceFactory(Creates an instance with a custom |
Public functions |
|
|---|---|
MediaSource! |
createMediaSource(mediaItem: MediaItem!)Creates a new |
IntArray<Int>! |
Returns the |
MediaSourceFactory! |
setDrmSessionManagerProvider(Sets the |
MediaSourceFactory! |
setLoadErrorHandlingPolicy(Sets an optional |
Public properties |
|
|---|---|
@MonotonicNonNull FakeMediaSource! |
Inherited Constants |
||
|---|---|---|
|
||
|
Inherited functions |
||||||||||
|---|---|---|---|---|---|---|---|---|---|---|
|
Constants
DEFAULT_WINDOW_UID
const val DEFAULT_WINDOW_UID: Any!
The window UID used by media sources that are created by the factory.
Public constructors
FakeMediaSourceFactory
FakeMediaSourceFactory(
timelineWindowDefintionBuilder: FakeTimeline.TimelineWindowDefinition.Builder!
)
Creates an instance with a custom TimelineWindowDefinition.Builder
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 |
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. |