google / google/ExoPlayer

How can I play media with delay ?

Open
#10,963 1 comment 0 reactions 1 assignee Assigned to @marcbaechinger View on GitHub
question
Dominant language
Java
Stars
21.9k
Forks
6k
PR merge metrics
No merged PRs in 30d

Description

I want to give delay ms to media source when creating it.
Is it possible ?
I need to define the delay when setting up the player.

```kotlin
val audioSource = mediaSource.createMediaSource(MediaItem.fromUri(audioUri))
audioPlayer.setMediaSource(audioSource) // -> Can I add delay to here ?
```

Or is there an empty media source that I can define the duration of?

For this:

```kotlin
ConcatenatingMediaSource(1SecondEmptySource(), MySource())
```

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.