-
Notifications
You must be signed in to change notification settings - Fork 1
/
PillarboxPlayer.kt
49 lines (44 loc) · 1.36 KB
/
PillarboxPlayer.kt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
/*
* 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 [Player] interface extension.
*/
interface PillarboxPlayer : Player {
/**
* Listener
*/
interface Listener : Player.Listener {
/**
* On smooth seeking enabled changed
*
* @param smoothSeekingEnabled The new value of [PillarboxPlayer.smoothSeekingEnabled]
*/
fun onSmoothSeekingEnabledChanged(smoothSeekingEnabled: Boolean) {}
/**
* On tracking enabled changed
*
* @param trackingEnabled The new value of [PillarboxPlayer.trackingEnabled]
*/
fun onTrackingEnabledChanged(trackingEnabled: 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
/**
* Enable or disable MediaItem tracking
*/
var trackingEnabled: Boolean
}