TestExoPlayerBuilder
@UnstableApi
class TestExoPlayerBuilder
A builder of ExoPlayer instances for testing.
Summary
Public constructors |
|---|
TestExoPlayerBuilder(context: Context!) |
Public properties |
|
|---|---|
BandwidthMeter! |
|
Clock! |
|
LoadControl! |
|
@MonotonicNonNull Looper! |
|
MediaSource.Factory? |
|
Array<Renderer!>? |
|
RenderersFactory? |
|
Long |
|
Long |
|
DefaultTrackSelector! |
|
Boolean |
Public constructors
Public functions
getMaxSeekToPreviousPosition
fun getMaxSeekToPreviousPosition(): Long
Returns the max seek to previous position used by the player.
setDeviceVolumeControlEnabled
@CanIgnoreReturnValue
fun setDeviceVolumeControlEnabled(deviceVolumeControlEnabled: Boolean): TestExoPlayerBuilder!
Sets the variable controlling player's ability to get/set device volume.
| Parameters | |
|---|---|
deviceVolumeControlEnabled: Boolean |
Whether the player can get/set device volume. |
| Returns | |
|---|---|
TestExoPlayerBuilder! |
This builder. |
setDynamicSchedulingEnabled
@CanIgnoreReturnValue
fun setDynamicSchedulingEnabled(dynamicSchedulingEnabled: Boolean): TestExoPlayerBuilder!
See experimentalSetDynamicSchedulingEnabled for details.
| Parameters | |
|---|---|
dynamicSchedulingEnabled: Boolean |
Whether the player should enable dynamically schedule its playback loop for when |
| Returns | |
|---|---|
TestExoPlayerBuilder! |
This builder. |
setMaxSeekToPreviousPositionMs
@CanIgnoreReturnValue
fun setMaxSeekToPreviousPositionMs(maxSeekToPreviousPositionMs: Long): TestExoPlayerBuilder!
Sets the max seek to previous position, in milliseconds, to be used by the player.
| Parameters | |
|---|---|
maxSeekToPreviousPositionMs: Long |
The max seek to previous position to be used by the player. |
| Returns | |
|---|---|
TestExoPlayerBuilder! |
This builder. |
setPreloadConfiguration
@CanIgnoreReturnValue
fun setPreloadConfiguration(
preloadConfiguration: ExoPlayer.PreloadConfiguration!
): TestExoPlayerBuilder!
Sets the preload configuration.
| See also | |
|---|---|
setPreloadConfiguration |
setRenderers
@CanIgnoreReturnValue
fun setRenderers(renderers: Array<Renderer!>!): TestExoPlayerBuilder!
Sets the Renderers. If not set, the player will use a FakeVideoRenderer and a FakeAudioRenderer. Setting the renderers is not allowed after a call to setRenderersFactory.
| Returns | |
|---|---|
TestExoPlayerBuilder! |
This builder. |
setStuckPlayingDetectionTimeoutMs
@CanIgnoreReturnValue
fun setStuckPlayingDetectionTimeoutMs(stuckPlayingDetectionTimeoutMs: Int): TestExoPlayerBuilder!
See setStuckPlayingDetectionTimeoutMs for details.
| Parameters | |
|---|---|
stuckPlayingDetectionTimeoutMs: Int |
The timeout after which the player is assumed stuck playing, in milliseconds. |
| Returns | |
|---|---|
TestExoPlayerBuilder! |
This builder. |
setStuckSuppressedDetectionTimeoutMs
@CanIgnoreReturnValue
fun setStuckSuppressedDetectionTimeoutMs(
stuckSuppressedDetectionTimeoutMs: Int
): TestExoPlayerBuilder!
See setStuckSuppressedDetectionTimeoutMs for details.
| Parameters | |
|---|---|
stuckSuppressedDetectionTimeoutMs: Int |
The timeout after which the player is assumed stuck in a suppressed state, in milliseconds. |
| Returns | |
|---|---|
TestExoPlayerBuilder! |
This builder. |
setSuitableOutputChecker
@CanIgnoreReturnValue
@RequiresApi(value = 35)
fun setSuitableOutputChecker(suitableOutputChecker: SuitableOutputChecker!): TestExoPlayerBuilder!
Sets the SuitableOutputChecker to check the suitability of the selected outputs for playback.
If this method is not called, the library uses a default implementation based on framework APIs.
| Returns | |
|---|---|
TestExoPlayerBuilder! |
This builder. |
setSuppressPlaybackOnUnsuitableOutput
@CanIgnoreReturnValue
fun setSuppressPlaybackOnUnsuitableOutput(
suppressPlaybackOnUnsuitableOutput: Boolean
): TestExoPlayerBuilder!
See setSuppressPlaybackOnUnsuitableOutput for details.
| Parameters | |
|---|---|
suppressPlaybackOnUnsuitableOutput: Boolean |
Whether the player should suppress the playback when it is attempted on an unsuitable output. |
| Returns | |
|---|---|
TestExoPlayerBuilder! |
This builder. |