-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Co-authored-by: Gaëtan Muller <[email protected]>
- Loading branch information
Showing
11 changed files
with
264 additions
and
199 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
51 changes: 0 additions & 51 deletions
51
...x-demo/src/main/java/ch/srgssr/pillarbox/demo/ui/showcases/misc/SmoothSeekingViewModel.kt
This file was deleted.
Oops, something went wrong.
38 changes: 38 additions & 0 deletions
38
pillarbox-player/src/main/java/ch/srgssr/pillarbox/player/PillarboxExoPlayer.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
/* | ||
* Copyright (c) SRG SSR. All rights reserved. | ||
* License information is available from the LICENSE file. | ||
*/ | ||
package ch.srgssr.pillarbox.player | ||
|
||
import androidx.media3.common.Player | ||
import androidx.media3.exoplayer.ExoPlayer | ||
import androidx.media3.exoplayer.SeekParameters | ||
|
||
/** | ||
* Pillarbox [ExoPlayer] interface extension. | ||
*/ | ||
interface PillarboxExoPlayer : ExoPlayer { | ||
|
||
/** | ||
* Listener | ||
*/ | ||
interface Listener : Player.Listener { | ||
/** | ||
* On smooth seeking enabled changed | ||
* | ||
* @param smoothSeekingEnabled The new value of [smoothSeekingEnabled] | ||
*/ | ||
fun onSmoothSeekingEnabledChanged(smoothSeekingEnabled: Boolean) | ||
} | ||
|
||
/** | ||
* Smooth seeking enabled | ||
* | ||
* When [smoothSeekingEnabled] is true, next seek events is send only after the current is done. | ||
* | ||
* To have the best result it is important to | ||
* 1) Pause the player while seeking. | ||
* 2) Set the [ExoPlayer.setSeekParameters] to [SeekParameters.CLOSEST_SYNC]. | ||
*/ | ||
var smoothSeekingEnabled: Boolean | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.