mirror of
https://github.com/signalapp/Signal-Android.git
synced 2026-04-22 01:40:07 +01:00
Add seek buttons for videos longer than 30s.
This commit is contained in:
@@ -222,7 +222,7 @@ public class VideoPlayer extends FrameLayout {
|
||||
super.setOnClickListener(l);
|
||||
}
|
||||
|
||||
public @Nullable View getControlView() {
|
||||
public @Nullable PlayerControlView getControlView() {
|
||||
return this.exoControls;
|
||||
}
|
||||
|
||||
|
||||
@@ -61,6 +61,8 @@ class SimpleExoPlayerPool(context: Context) : ExoPlayerPool<ExoPlayer>(MAXIMUM_R
|
||||
override fun createPlayer(): ExoPlayer {
|
||||
return ExoPlayer.Builder(context)
|
||||
.setMediaSourceFactory(mediaSourceFactory)
|
||||
.setSeekBackIncrementMs(SEEK_INTERVAL.inWholeMilliseconds)
|
||||
.setSeekForwardIncrementMs(SEEK_INTERVAL.inWholeMilliseconds)
|
||||
.build()
|
||||
}
|
||||
|
||||
@@ -68,6 +70,7 @@ class SimpleExoPlayerPool(context: Context) : ExoPlayerPool<ExoPlayer>(MAXIMUM_R
|
||||
private const val MAXIMUM_RESERVED_PLAYERS = 1
|
||||
private const val MAXIMUM_SUPPORTED_PLAYBACK_PRE_23 = 6
|
||||
private const val MAXIMUM_SUPPORTED_PLAYBACK_PRE_23_LOW_MEM = 3
|
||||
private val SEEK_INTERVAL = 15.seconds
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user