@pigeonmal/react-native-video 7.0.0-beta.11 → 7.0.0-beta.12
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -5,14 +5,13 @@ import androidx.media3.common.C
|
|
|
5
5
|
import androidx.media3.common.TrackSelectionOverride
|
|
6
6
|
import androidx.media3.common.util.UnstableApi
|
|
7
7
|
import androidx.media3.exoplayer.ExoPlayer
|
|
8
|
-
import com.margelo.nitro.video.HybridVideoPlayerSourceSpec
|
|
9
8
|
import com.margelo.nitro.video.PlayerTrack
|
|
10
9
|
import com.margelo.nitro.video.AllPlayerTracks
|
|
11
10
|
import com.margelo.nitro.video.VideoPlayerTrack
|
|
12
11
|
|
|
13
12
|
@UnstableApi
|
|
14
13
|
object TrackUtils {
|
|
15
|
-
fun getAvailableTextTracks(player: ExoPlayer
|
|
14
|
+
fun getAvailableTextTracks(player: ExoPlayer): Array<PlayerTrack> {
|
|
16
15
|
return Threading.runOnMainThreadSync {
|
|
17
16
|
val tracks = mutableListOf<PlayerTrack>()
|
|
18
17
|
val currentTracks = player.currentTracks
|
|
@@ -44,7 +44,7 @@ import kotlin.math.max
|
|
|
44
44
|
@UnstableApi
|
|
45
45
|
@DoNotStrip
|
|
46
46
|
class HybridVideoPlayer() : HybridVideoPlayerSpec(), AutoCloseable {
|
|
47
|
-
override var source: HybridVideoPlayerSourceSpec?
|
|
47
|
+
override var source: HybridVideoPlayerSourceSpec? = null
|
|
48
48
|
override var eventEmitter = HybridVideoPlayerEventEmitter()
|
|
49
49
|
set(value) {
|
|
50
50
|
if (field != value) {
|
|
@@ -74,7 +74,7 @@ class HybridVideoPlayer() : HybridVideoPlayerSpec(), AutoCloseable {
|
|
|
74
74
|
|
|
75
75
|
// Buffer Config
|
|
76
76
|
private var bufferConfig: BufferConfig? = null
|
|
77
|
-
get() = source?.config
|
|
77
|
+
get() = source?.config?.bufferConfig
|
|
78
78
|
|
|
79
79
|
// Time updates
|
|
80
80
|
private val progressHandler = Handler(Looper.getMainLooper())
|
|
@@ -636,7 +636,7 @@ class HybridVideoPlayer() : HybridVideoPlayerSpec(), AutoCloseable {
|
|
|
636
636
|
// MARK: - Text Track Management
|
|
637
637
|
|
|
638
638
|
override fun getAvailableTextTracks(): Array<PlayerTrack> {
|
|
639
|
-
return TrackUtils.getAvailableTextTracks(player
|
|
639
|
+
return TrackUtils.getAvailableTextTracks(player)
|
|
640
640
|
}
|
|
641
641
|
|
|
642
642
|
override fun getAllPlayerTracks(): AllPlayerTracks {
|