kopia lustrzana https://github.com/vitorpamplona/amethyst
Fixes videos not being able to seekTo the zero position.
rodzic
d26de39749
commit
9867ac1689
|
@ -27,6 +27,7 @@ import android.util.LruCache
|
|||
import androidx.core.net.toUri
|
||||
import androidx.media3.common.C
|
||||
import androidx.media3.common.Player
|
||||
import androidx.media3.common.Player.PositionInfo
|
||||
import androidx.media3.common.Player.STATE_IDLE
|
||||
import androidx.media3.common.Player.STATE_READY
|
||||
import androidx.media3.exoplayer.ExoPlayer
|
||||
|
@ -143,6 +144,14 @@ class MultiPlayerPlaybackManager(
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
override fun onPositionDiscontinuity(
|
||||
oldPosition: PositionInfo,
|
||||
newPosition: PositionInfo,
|
||||
reason: Int,
|
||||
) {
|
||||
cachedPositions.add(uri, newPosition.positionMs)
|
||||
}
|
||||
},
|
||||
)
|
||||
|
||||
|
|
Ładowanie…
Reference in New Issue