expo-video 3.0.2 → 3.0.4

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.
Files changed (71) hide show
  1. package/CHANGELOG.md +21 -0
  2. package/android/build.gradle +2 -2
  3. package/android/src/main/java/expo/modules/video/VideoManager.kt +25 -0
  4. package/android/src/main/java/expo/modules/video/VideoModule.kt +8 -0
  5. package/android/src/main/java/expo/modules/video/player/VideoPlayer.kt +4 -0
  6. package/android/src/main/java/expo/modules/video/player/VideoPlayerKeepAwake.kt +91 -0
  7. package/android/src/main/java/expo/modules/video/utils/WeakMutableSet.kt +120 -0
  8. package/android/src/main/res/layout/fullscreen_player_activity.xml +2 -1
  9. package/build/VideoPlayer.types.d.ts +10 -0
  10. package/build/VideoPlayer.types.d.ts.map +1 -1
  11. package/build/VideoPlayer.types.js.map +1 -1
  12. package/build/VideoPlayer.web.d.ts +1 -0
  13. package/build/VideoPlayer.web.d.ts.map +1 -1
  14. package/build/VideoPlayer.web.js +1 -0
  15. package/build/VideoPlayer.web.js.map +1 -1
  16. package/build/VideoView.types.d.ts +11 -0
  17. package/build/VideoView.types.d.ts.map +1 -1
  18. package/build/VideoView.types.js.map +1 -1
  19. package/build/VideoView.web.d.ts.map +1 -1
  20. package/build/VideoView.web.js +18 -2
  21. package/build/VideoView.web.js.map +1 -1
  22. package/expo-module.config.json +1 -1
  23. package/ios/VideoModule.swift +7 -0
  24. package/ios/VideoPlayerObserver.swift +1 -1
  25. package/local-maven-repo/host/exp/exponent/expo.modules.video/{3.0.2/expo.modules.video-3.0.2-sources.jar → 3.0.4/expo.modules.video-3.0.4-sources.jar} +0 -0
  26. package/local-maven-repo/host/exp/exponent/expo.modules.video/3.0.4/expo.modules.video-3.0.4-sources.jar.md5 +1 -0
  27. package/local-maven-repo/host/exp/exponent/expo.modules.video/3.0.4/expo.modules.video-3.0.4-sources.jar.sha1 +1 -0
  28. package/local-maven-repo/host/exp/exponent/expo.modules.video/3.0.4/expo.modules.video-3.0.4-sources.jar.sha256 +1 -0
  29. package/local-maven-repo/host/exp/exponent/expo.modules.video/3.0.4/expo.modules.video-3.0.4-sources.jar.sha512 +1 -0
  30. package/local-maven-repo/host/exp/exponent/expo.modules.video/3.0.4/expo.modules.video-3.0.4.aar +0 -0
  31. package/local-maven-repo/host/exp/exponent/expo.modules.video/3.0.4/expo.modules.video-3.0.4.aar.md5 +1 -0
  32. package/local-maven-repo/host/exp/exponent/expo.modules.video/3.0.4/expo.modules.video-3.0.4.aar.sha1 +1 -0
  33. package/local-maven-repo/host/exp/exponent/expo.modules.video/3.0.4/expo.modules.video-3.0.4.aar.sha256 +1 -0
  34. package/local-maven-repo/host/exp/exponent/expo.modules.video/3.0.4/expo.modules.video-3.0.4.aar.sha512 +1 -0
  35. package/local-maven-repo/host/exp/exponent/expo.modules.video/{3.0.2/expo.modules.video-3.0.2.module → 3.0.4/expo.modules.video-3.0.4.module} +22 -22
  36. package/local-maven-repo/host/exp/exponent/expo.modules.video/3.0.4/expo.modules.video-3.0.4.module.md5 +1 -0
  37. package/local-maven-repo/host/exp/exponent/expo.modules.video/3.0.4/expo.modules.video-3.0.4.module.sha1 +1 -0
  38. package/local-maven-repo/host/exp/exponent/expo.modules.video/3.0.4/expo.modules.video-3.0.4.module.sha256 +1 -0
  39. package/local-maven-repo/host/exp/exponent/expo.modules.video/3.0.4/expo.modules.video-3.0.4.module.sha512 +1 -0
  40. package/local-maven-repo/host/exp/exponent/expo.modules.video/{3.0.2/expo.modules.video-3.0.2.pom → 3.0.4/expo.modules.video-3.0.4.pom} +1 -1
  41. package/local-maven-repo/host/exp/exponent/expo.modules.video/3.0.4/expo.modules.video-3.0.4.pom.md5 +1 -0
  42. package/local-maven-repo/host/exp/exponent/expo.modules.video/3.0.4/expo.modules.video-3.0.4.pom.sha1 +1 -0
  43. package/local-maven-repo/host/exp/exponent/expo.modules.video/3.0.4/expo.modules.video-3.0.4.pom.sha256 +1 -0
  44. package/local-maven-repo/host/exp/exponent/expo.modules.video/3.0.4/expo.modules.video-3.0.4.pom.sha512 +1 -0
  45. package/local-maven-repo/host/exp/exponent/expo.modules.video/maven-metadata.xml +4 -4
  46. package/local-maven-repo/host/exp/exponent/expo.modules.video/maven-metadata.xml.md5 +1 -1
  47. package/local-maven-repo/host/exp/exponent/expo.modules.video/maven-metadata.xml.sha1 +1 -1
  48. package/local-maven-repo/host/exp/exponent/expo.modules.video/maven-metadata.xml.sha256 +1 -1
  49. package/local-maven-repo/host/exp/exponent/expo.modules.video/maven-metadata.xml.sha512 +1 -1
  50. package/package.json +3 -3
  51. package/src/VideoPlayer.types.ts +11 -0
  52. package/src/VideoPlayer.web.tsx +1 -0
  53. package/src/VideoView.types.ts +12 -0
  54. package/src/VideoView.web.tsx +18 -2
  55. package/local-maven-repo/host/exp/exponent/expo.modules.video/3.0.2/expo.modules.video-3.0.2-sources.jar.md5 +0 -1
  56. package/local-maven-repo/host/exp/exponent/expo.modules.video/3.0.2/expo.modules.video-3.0.2-sources.jar.sha1 +0 -1
  57. package/local-maven-repo/host/exp/exponent/expo.modules.video/3.0.2/expo.modules.video-3.0.2-sources.jar.sha256 +0 -1
  58. package/local-maven-repo/host/exp/exponent/expo.modules.video/3.0.2/expo.modules.video-3.0.2-sources.jar.sha512 +0 -1
  59. package/local-maven-repo/host/exp/exponent/expo.modules.video/3.0.2/expo.modules.video-3.0.2.aar +0 -0
  60. package/local-maven-repo/host/exp/exponent/expo.modules.video/3.0.2/expo.modules.video-3.0.2.aar.md5 +0 -1
  61. package/local-maven-repo/host/exp/exponent/expo.modules.video/3.0.2/expo.modules.video-3.0.2.aar.sha1 +0 -1
  62. package/local-maven-repo/host/exp/exponent/expo.modules.video/3.0.2/expo.modules.video-3.0.2.aar.sha256 +0 -1
  63. package/local-maven-repo/host/exp/exponent/expo.modules.video/3.0.2/expo.modules.video-3.0.2.aar.sha512 +0 -1
  64. package/local-maven-repo/host/exp/exponent/expo.modules.video/3.0.2/expo.modules.video-3.0.2.module.md5 +0 -1
  65. package/local-maven-repo/host/exp/exponent/expo.modules.video/3.0.2/expo.modules.video-3.0.2.module.sha1 +0 -1
  66. package/local-maven-repo/host/exp/exponent/expo.modules.video/3.0.2/expo.modules.video-3.0.2.module.sha256 +0 -1
  67. package/local-maven-repo/host/exp/exponent/expo.modules.video/3.0.2/expo.modules.video-3.0.2.module.sha512 +0 -1
  68. package/local-maven-repo/host/exp/exponent/expo.modules.video/3.0.2/expo.modules.video-3.0.2.pom.md5 +0 -1
  69. package/local-maven-repo/host/exp/exponent/expo.modules.video/3.0.2/expo.modules.video-3.0.2.pom.sha1 +0 -1
  70. package/local-maven-repo/host/exp/exponent/expo.modules.video/3.0.2/expo.modules.video-3.0.2.pom.sha256 +0 -1
  71. package/local-maven-repo/host/exp/exponent/expo.modules.video/3.0.2/expo.modules.video-3.0.2.pom.sha512 +0 -1
package/CHANGELOG.md CHANGED
@@ -10,6 +10,27 @@
10
10
 
11
11
  ### 💡 Others
12
12
 
13
+ ## 3.0.4 — 2025-08-21
14
+
15
+ ### 🎉 New features
16
+
17
+ - [Web] Add `useAudioNodePlayback` prop. ([#39039](https://github.com/expo/expo/pull/39039) by [@behenate](https://github.com/behenate))
18
+
19
+ ### 🐛 Bug fixes
20
+
21
+ - [iOS] Fix `sourceLoad` event not being emitted. ([#39023](https://github.com/expo/expo/pull/39023) by [@behenate](https://github.com/behenate))
22
+ - [Web] Fix audio not playing due to conflicting CORS and AudioNode settings. ([#39039](https://github.com/expo/expo/pull/39039) by [@behenate](https://github.com/behenate))
23
+
24
+ ## 3.0.3 — 2025-08-21
25
+
26
+ ### 🎉 New features
27
+
28
+ - [Android][iOS] Add `keepScreenOnWhilePlaying` property to the player. ([#37137](https://github.com/expo/expo/pull/37137) by [@behenate](https://github.com/behenate))
29
+
30
+ ### 💡 Others
31
+
32
+ - [Android] Keep the screen on while playback is running by default. ([#37137](https://github.com/expo/expo/pull/37137) by [@behenate](https://github.com/behenate))
33
+
13
34
  ## 3.0.2 — 2025-08-16
14
35
 
15
36
  _This version does not introduce any user-facing changes._
@@ -4,13 +4,13 @@ plugins {
4
4
  }
5
5
 
6
6
  group = 'host.exp.exponent'
7
- version = '3.0.2'
7
+ version = '3.0.4'
8
8
 
9
9
  android {
10
10
  namespace "expo.modules.video"
11
11
  defaultConfig {
12
12
  versionCode 1
13
- versionName '3.0.2'
13
+ versionName '3.0.4'
14
14
  }
15
15
  }
16
16
 
@@ -5,12 +5,14 @@ import androidx.media3.common.util.UnstableApi
5
5
  import expo.modules.kotlin.AppContext
6
6
  import expo.modules.kotlin.exception.Exceptions
7
7
  import expo.modules.video.player.VideoPlayer
8
+ import expo.modules.video.utils.weakMutableHashSetOf
8
9
  import java.lang.ref.WeakReference
9
10
 
10
11
  // Helper class used to keep track of all existing VideoViews and VideoPlayers
11
12
  @OptIn(UnstableApi::class)
12
13
  object VideoManager {
13
14
  const val INTENT_PLAYER_KEY = "player_uuid"
15
+ private var appContext: WeakReference<AppContext?> = WeakReference(null)
14
16
 
15
17
  // Used for sharing videoViews between VideoView and FullscreenPlayerActivity
16
18
  private var videoViews = mutableMapOf<String, VideoView>()
@@ -19,11 +21,14 @@ object VideoManager {
19
21
  // Keeps track of all existing VideoPlayers, and whether they are attached to a VideoView
20
22
  private var videoPlayersToVideoViews = mutableMapOf<VideoPlayer, MutableList<VideoView>>()
21
23
 
24
+ private var playersRequestingKeepAwake = weakMutableHashSetOf<VideoPlayer>()
25
+
22
26
  private lateinit var audioFocusManager: AudioFocusManager
23
27
  lateinit var cache: VideoCache
24
28
 
25
29
  fun onModuleCreated(appContext: AppContext) {
26
30
  val context = appContext.reactContext ?: throw Exceptions.ReactContextLost()
31
+ this.appContext = WeakReference(appContext)
27
32
 
28
33
  if (!this::audioFocusManager.isInitialized) {
29
34
  audioFocusManager = AudioFocusManager(appContext)
@@ -85,6 +90,16 @@ object VideoManager {
85
90
  }
86
91
  }
87
92
 
93
+ fun requestKeepAwake(player: VideoPlayer) {
94
+ playersRequestingKeepAwake.add(player)
95
+ applyKeepAwake()
96
+ }
97
+
98
+ fun releaseKeepAwake(player: VideoPlayer) {
99
+ playersRequestingKeepAwake.remove(player)
100
+ applyKeepAwake()
101
+ }
102
+
88
103
  fun isVideoPlayerAttachedToView(videoPlayer: VideoPlayer): Boolean {
89
104
  return videoPlayersToVideoViews[videoPlayer]?.isNotEmpty() ?: false
90
105
  }
@@ -115,6 +130,16 @@ object VideoManager {
115
130
  }
116
131
  }
117
132
 
133
+ private fun applyKeepAwake() {
134
+ // Setting `WindowManager.LayoutParams.FLAG_KEEP_SCREEN_ON` would've been more efficient, but
135
+ // We can't be sure that it won't disable expo-keep-awake enabled when playersRequestingKeepAwake.size >= 1
136
+ // once playersRequestingKeepAwake.size goes down to 0
137
+ // It is safest to only set the flag to the video view.
138
+ for (videoView in videoViews.values) {
139
+ videoView.keepScreenOn = playersRequestingKeepAwake.isNotEmpty()
140
+ }
141
+ }
142
+
118
143
  private fun shouldPauseVideo(videoView: VideoView): Boolean {
119
144
  return videoView.videoPlayer?.staysActiveInBackground == false &&
120
145
  !videoView.willEnterPiP &&
@@ -292,6 +292,14 @@ class VideoModule : Module() {
292
292
  }
293
293
  }
294
294
 
295
+ Property("keepScreenOnWhilePlaying")
296
+ .get { ref: VideoPlayer ->
297
+ ref.keepScreenOnWhilePlaying
298
+ }
299
+ .set { ref: VideoPlayer, value: Boolean? ->
300
+ ref.keepScreenOnWhilePlaying = value ?: true
301
+ }
302
+
295
303
  Function("replace") { ref: VideoPlayer, source: Either<Uri, VideoSource>? ->
296
304
  replaceImpl(ref, source)
297
305
  }
@@ -174,6 +174,8 @@ class VideoPlayer(val context: Context, appContext: AppContext, source: VideoSou
174
174
  var availableVideoTracks: List<VideoTrack> = emptyList()
175
175
  private set
176
176
 
177
+ var keepScreenOnWhilePlaying by VideoPlayerKeepAwake(this, appContext)
178
+
177
179
  private val playerListener = object : Player.Listener {
178
180
  override fun onIsPlayingChanged(isPlaying: Boolean) {
179
181
  this@VideoPlayer.playing = isPlaying
@@ -311,6 +313,8 @@ class VideoPlayer(val context: Context, appContext: AppContext, source: VideoSou
311
313
  }
312
314
  uncommittedSource = null
313
315
  commitedSource = null
316
+ // Releases the listeners from VideoPlayerKeepAwake
317
+ keepScreenOnWhilePlaying = false
314
318
  }
315
319
 
316
320
  override fun deallocate() {
@@ -0,0 +1,91 @@
1
+ package expo.modules.video.player
2
+
3
+ import androidx.annotation.OptIn
4
+ import androidx.media3.common.Player
5
+ import androidx.media3.common.util.UnstableApi
6
+ import expo.modules.kotlin.AppContext
7
+ import expo.modules.video.VideoManager
8
+ import kotlinx.coroutines.launch
9
+ import java.lang.ref.WeakReference
10
+ import kotlin.properties.ReadWriteProperty
11
+ import kotlin.reflect.KProperty
12
+
13
+ /*
14
+ * Keeps the screen on as long as the provided player is playing and some VideoView is visible.
15
+ */
16
+ @OptIn(UnstableApi::class)
17
+ class VideoPlayerKeepAwake(player: VideoPlayer, val appContext: AppContext, enableOnInit: Boolean = true) : ReadWriteProperty<Any?, Boolean> {
18
+ private val videoPlayer: WeakReference<VideoPlayer?> = WeakReference(player)
19
+ var enabled = enableOnInit
20
+ set(value) {
21
+ if (value) {
22
+ enable()
23
+ } else {
24
+ disable()
25
+ }
26
+ field = value
27
+ }
28
+ private var playerListener: Player.Listener? = null
29
+
30
+ init {
31
+ if (enableOnInit) {
32
+ enable()
33
+ }
34
+ }
35
+
36
+ private fun enable() {
37
+ appContext.mainQueue.launch {
38
+ val videoPlayer = this@VideoPlayerKeepAwake.videoPlayer.get() ?: return@launch
39
+ val playerListener = createPlayerListener()
40
+ this@VideoPlayerKeepAwake.playerListener = playerListener
41
+ videoPlayer.player.addListener(playerListener)
42
+ VideoManager.requestKeepAwake(videoPlayer)
43
+ }
44
+ }
45
+
46
+ private fun disable() {
47
+ appContext.mainQueue.launch {
48
+ val videoPlayer = this@VideoPlayerKeepAwake.videoPlayer.get() ?: return@launch
49
+ val playerListener = playerListener ?: return@launch
50
+ videoPlayer.player.removeListener(playerListener)
51
+ this@VideoPlayerKeepAwake.playerListener = null
52
+ VideoManager.releaseKeepAwake(videoPlayer)
53
+ }
54
+ }
55
+
56
+ private fun createPlayerListener(): Player.Listener {
57
+ return object : Player.Listener {
58
+ override fun onIsPlayingChanged(isPlaying: Boolean) {
59
+ val videoPlayer = this@VideoPlayerKeepAwake.videoPlayer.get() ?: return
60
+ if (isPlaying) {
61
+ VideoManager.requestKeepAwake(videoPlayer)
62
+ } else {
63
+ VideoManager.releaseKeepAwake(videoPlayer)
64
+ }
65
+ }
66
+
67
+ override fun onPlaybackStateChanged(playbackState: Int) {
68
+ val videoPlayer = this@VideoPlayerKeepAwake.videoPlayer.get() ?: return
69
+
70
+ when (playbackState) {
71
+ Player.STATE_READY, Player.STATE_BUFFERING -> {
72
+ if (videoPlayer.player.playWhenReady == true) { // Check if playback is intended
73
+ VideoManager.requestKeepAwake(videoPlayer)
74
+ }
75
+ }
76
+ Player.STATE_ENDED, Player.STATE_IDLE -> {
77
+ VideoManager.requestKeepAwake(videoPlayer)
78
+ }
79
+ }
80
+ }
81
+ }
82
+ }
83
+
84
+ override fun getValue(thisRef: Any?, property: KProperty<*>): Boolean {
85
+ return this.enabled
86
+ }
87
+
88
+ override fun setValue(thisRef: Any?, property: KProperty<*>, value: Boolean) {
89
+ this.enabled = value
90
+ }
91
+ }
@@ -0,0 +1,120 @@
1
+ package expo.modules.video.utils
2
+
3
+ import java.lang.ref.ReferenceQueue
4
+ import java.lang.ref.WeakReference
5
+ import java.util.HashSet
6
+
7
+ /** Returns a new, empty [WeakMutableSet]. */
8
+ internal fun <T> weakMutableHashSetOf(): WeakMutableSet<T> = WeakMutableSet()
9
+
10
+ /** Returns a new [WeakMutableSet] with the given elements. */
11
+ internal fun <T> weakMutableHashSetOf(vararg elements: T): WeakMutableSet<T> {
12
+ return WeakMutableSet<T>().apply {
13
+ addAll(elements.asList())
14
+ }
15
+ }
16
+
17
+ internal class WeakMutableSet<T> : MutableSet<T> {
18
+ private val delegate = HashSet<WeakElement<T>>()
19
+ private val referenceQueue = ReferenceQueue<T>()
20
+ override val size: Int
21
+ get() = delegate.size
22
+
23
+ override fun contains(element: T): Boolean {
24
+ return delegate.contains(WeakElement(element))
25
+ }
26
+
27
+ override fun add(element: T): Boolean {
28
+ removeGarbageCollectedEntries()
29
+ return delegate.add(WeakElement(element, this.referenceQueue))
30
+ }
31
+
32
+ override fun remove(element: T): Boolean {
33
+ val ret = delegate.remove(WeakElement(element))
34
+ removeGarbageCollectedEntries()
35
+ return ret
36
+ }
37
+
38
+ override fun containsAll(elements: Collection<T>): Boolean {
39
+ return elements.all(this::contains)
40
+ }
41
+
42
+ override fun addAll(elements: Collection<T>): Boolean {
43
+ return elements.fold(false) { changed, element ->
44
+ add(element) || changed
45
+ }
46
+ }
47
+
48
+ override fun retainAll(elements: Collection<T>): Boolean {
49
+ val itemsToRemove = this.filterNot { it in elements }.toSet()
50
+ return this.removeAll(itemsToRemove)
51
+ }
52
+
53
+ override fun removeAll(elements: Collection<T>): Boolean {
54
+ return elements.fold(false) { acc, element ->
55
+ remove(element) || acc
56
+ }
57
+ }
58
+
59
+ override fun clear() {
60
+ delegate.clear()
61
+ }
62
+
63
+ override fun isEmpty(): Boolean {
64
+ return delegate.isEmpty()
65
+ }
66
+
67
+ override fun iterator(): MutableIterator<T> {
68
+ removeGarbageCollectedEntries()
69
+
70
+ val i = delegate.iterator()
71
+
72
+ return object : MutableIterator<T> {
73
+ override fun hasNext(): Boolean {
74
+ return i.hasNext()
75
+ }
76
+
77
+ override fun next(): T {
78
+ // We should be relatively safe as we just called removeGarbageCollectedEntries
79
+ return i.next().get() ?: throw NoSuchElementException("The next element was garbage collected.")
80
+ }
81
+
82
+ override fun remove() {
83
+ i.remove()
84
+ }
85
+ }
86
+ }
87
+
88
+ private fun removeGarbageCollectedEntries() {
89
+ while (true) {
90
+ val weakElem = referenceQueue.poll() as? WeakElement<out T> ?: break
91
+ delegate.remove(weakElem)
92
+ }
93
+ }
94
+ }
95
+
96
+ /**
97
+ * A WeakReference that compares the stored object instead of the WeakReferences themselves.
98
+ */
99
+ private class WeakElement<T> : WeakReference<T> {
100
+ private val hash: Int
101
+
102
+ constructor(o: T) : super(o) {
103
+ hash = o?.hashCode() ?: 0
104
+ }
105
+
106
+ constructor(o: T, q: ReferenceQueue<T>) : super(o, q) {
107
+ hash = o?.hashCode() ?: 0
108
+ }
109
+
110
+ override fun equals(other: Any?): Boolean {
111
+ if (other !is WeakElement<*>) {
112
+ return false
113
+ }
114
+ return this === other || this.get() == other.get()
115
+ }
116
+
117
+ override fun hashCode(): Int {
118
+ return hash
119
+ }
120
+ }
@@ -12,6 +12,7 @@
12
12
  android:id="@+id/player_view"
13
13
  android:layout_width="match_parent"
14
14
  android:layout_height="match_parent"
15
- android:background="@android:color/black"/>
15
+ android:background="@android:color/black"
16
+ android:keepScreenOn="true"/>
16
17
 
17
18
  </FrameLayout>
@@ -94,6 +94,16 @@ export declare class VideoPlayer extends SharedObject<VideoPlayerEvents> {
94
94
  * @default 1.0
95
95
  */
96
96
  playbackRate: number;
97
+ /**
98
+ * Boolean indicating if the player should keep the screen on while playing.
99
+ *
100
+ * > On Android, this property has an effect only when a [`VideoView`](#videoview) is visible. If you want to keep the screen awake at all times use [`expo-keep-awake`](./keep-awake/).
101
+ *
102
+ * @default true
103
+ * @platform android
104
+ * @platform ios
105
+ */
106
+ keepScreenOnWhilePlaying: boolean;
97
107
  /**
98
108
  * Boolean value indicating whether the player is currently playing a live stream.
99
109
  */
@@ -1 +1 @@
1
- {"version":3,"file":"VideoPlayer.types.d.ts","sourceRoot":"","sources":["../src/VideoPlayer.types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,MAAM,CAAC;AAEpC,OAAO,EAAE,iBAAiB,EAAE,MAAM,2BAA2B,CAAC;AAC9D,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAElD;;GAEG;AACH,MAAM,CAAC,OAAO,OAAO,WAAY,SAAQ,YAAY,C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,EAAE,MAAM,CAAC;IAEjB;;OAEG;IACH,KAAK,EAAE,MAAM,CAAC;CACf,CAAC;AAEF;;GAEG;AACH,MAAM,MAAM,UAAU,GAAG;IACvB;;;;OAIG;IACH,EAAE,EAAE,MAAM,CAAC;IAEX;;OAEG;IACH,IAAI,EAAE,SAAS,CAAC;IAEhB;;OAEG;IACH,QAAQ,EAAE,MAAM,GAAG,IAAI,CAAC;IAExB;;;;OAIG;IACH,WAAW,EAAE,OAAO,CAAC;IAErB;;OAEG;IACH,OAAO,EAAE,MAAM,GAAG,IAAI,CAAC;IAEvB;;OAEG;IACH,SAAS,EAAE,MAAM,GAAG,IAAI,CAAC;CAC1B,CAAC;AAEF;;GAEG;AACH,MAAM,MAAM,SAAS,GAAG;IACtB;;OAEG;IACH,KAAK,EAAE,MAAM,CAAC;IACd;;OAEG;IACH,MAAM,EAAE,MAAM,CAAC;CAChB,CAAC;AAEF,MAAM,MAAM,UAAU,GAAG;IACvB;;;OAGG;IACH,EAAE,EAAE,MAAM,CAAC;IAEX;;OAEG;IACH,QAAQ,EAAE,MAAM,CAAC;IAEjB;;OAEG;IACH,KAAK,EAAE,MAAM,CAAC;CACf,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"VideoPlayer.types.js","sourceRoot":"","sources":["../src/VideoPlayer.types.ts"],"names":[],"mappings":"","sourcesContent":["import { SharedObject } from 'expo';\n\nimport { VideoPlayerEvents } from './VideoPlayerEvents.types';\nimport { VideoThumbnail } from './VideoThumbnail';\n\n/**\n * A class that represents an instance of the video player.\n */\nexport declare class VideoPlayer extends SharedObject<VideoPlayerEvents> {\n /**\n * Boolean value whether the player is currently playing.\n * > Use `play` and `pause` methods to control the playback.\n */\n readonly playing: boolean;\n\n /**\n * Determines whether the player should automatically replay after reaching the end of the video.\n * @default false\n */\n loop: boolean;\n\n /**\n * Determines whether the player should allow external playback.\n * @default true\n * @platform ios\n */\n allowsExternalPlayback: boolean;\n\n /**\n * Determines how the player will interact with other audio playing in the system.\n *\n * @default 'auto'\n * @platform android\n * @platform ios\n */\n audioMixingMode: AudioMixingMode;\n\n /**\n * Boolean value whether the player is currently muted.\n * Setting this property to `true`/`false` will mute/unmute the player.\n * @default false\n */\n muted: boolean;\n\n /**\n * Float value indicating the current playback time in seconds.\n *\n * If the player is not yet playing, this value indicates the time position\n * at which playback will begin once the `play()` method is called.\n *\n * Setting `currentTime` to a new value seeks the player to the given time.\n * Note that frame accurate seeking may incur additional decoding delay which can impact seeking performance.\n * Consider using the [`seekBy`](#seekbyseconds) function if the time does not have to be set precisely.\n */\n currentTime: number;\n\n /**\n * The exact timestamp when the currently displayed video frame was sent from the server,\n * based on the `EXT-X-PROGRAM-DATE-TIME` tag in the livestream metadata.\n * If this metadata is missing, this property will return `null`.\n * @platform android\n * @platform ios\n */\n readonly currentLiveTimestamp: number | null;\n\n /**\n * Float value indicating the latency of the live stream in seconds.\n * If a livestream doesn't have the required metadata, this will return `null`.\n * @platform android\n * @platform ios\n */\n readonly currentOffsetFromLive: number | null;\n\n /**\n * Float value indicating the time offset from the live in seconds.\n * @platform ios\n */\n targetOffsetFromLive: number;\n\n /**\n * Float value indicating the duration of the current video in seconds.\n */\n readonly duration: number;\n\n /**\n * Float value between `0` and `1.0` representing the current volume.\n * Muting the player doesn't affect the volume. In other words, when the player is muted, the volume is the same as\n * when unmuted. Similarly, setting the volume doesn't unmute the player.\n * @default 1.0\n */\n volume: number;\n\n /**\n * Boolean value indicating if the player should correct audio pitch when the playback speed changes.\n * @default true\n */\n preservesPitch: boolean;\n\n /**\n * Float value indicating the interval in seconds at which the player will emit the [`timeUpdate`](#videoplayerevents) event.\n * When the value is equal to `0`, the event will not be emitted.\n *\n * @default 0\n */\n timeUpdateEventInterval: number;\n\n /**\n * Float value between `0` and `16.0` indicating the current playback speed of the player.\n * @default 1.0\n */\n playbackRate: number;\n\n /**\n * Boolean value indicating whether the player is currently playing a live stream.\n */\n readonly isLive: boolean;\n\n /**\n * Indicates the current status of the player.\n */\n readonly status: VideoPlayerStatus;\n\n /**\n * Boolean value determining whether the player should show the now playing notification.\n *\n * @default false\n * @platform android\n * @platform ios\n */\n showNowPlayingNotification: boolean;\n\n /**\n * Determines whether the player should continue playing after the app enters the background.\n * @default false\n * @platform ios\n * @platform android\n */\n staysActiveInBackground: boolean;\n\n /**\n * Float value indicating how far the player has buffered the video in seconds.\n *\n * This value is 0 when the player has not buffered up to the current playback time.\n * When it's impossible to determine the buffer state (for example, when the player isn't playing any media), this value is -1.\n */\n readonly bufferedPosition: number;\n\n /**\n * Specifies buffer options which will be used by the player when buffering the video.\n *\n * > You should provide a `BufferOptions` object when setting this property. Setting individual buffer properties is not supported.\n * @platform android\n * @platform ios\n */\n bufferOptions: BufferOptions;\n\n /**\n * Specifies the subtitle track which is currently displayed by the player. `null` when no subtitles are displayed.\n *\n * > To ensure a valid subtitle track, always assign one of the subtitle tracks from the [`availableSubtitleTracks`](#availablesubtitletracks) array.\n *\n * @default null\n * @platform android\n * @platform ios\n */\n subtitleTrack: SubtitleTrack | null;\n\n /**\n * Specifies the audio track currently played by the player. `null` when no audio is played.\n *\n * @default null\n * @platform android\n * @platform ios\n */\n audioTrack: AudioTrack | null;\n\n /**\n * An array of audio tracks available for the current video.\n *\n * @platform android\n * @platform ios\n */\n readonly availableAudioTracks: AudioTrack[];\n\n /**\n * An array of subtitle tracks available for the current video.\n *\n * @platform android\n * @platform ios\n */\n readonly availableSubtitleTracks: SubtitleTrack[];\n\n /**\n * Specifies the video track currently played by the player. `null` when no video is displayed.\n *\n * @default null\n * @platform android\n * @platform ios\n */\n readonly videoTrack: VideoTrack | null;\n\n /**\n * An array of video tracks available for the current video.\n *\n * > On iOS, when using a HLS source, make sure that the uri contains `.m3u8` extension or that the [`contentType`](#contenttype) property of the [`VideoSource`](#videosource) has been set to `'hls'`. Otherwise, the video tracks will not be available.\n *\n * @platform android\n * @platform ios\n */\n readonly availableVideoTracks: VideoTrack[];\n\n /**\n * Indicates whether the player is currently playing back the media to an external device via AirPlay.\n *\n * @platform ios\n */\n readonly isExternalPlaybackActive: boolean;\n\n /**\n * Initializes a new video player instance with the given source.\n *\n * @param source The source of the video to be played.\n * @param useSynchronousReplace Optional parameter, when `true` `source` from the first parameter will be loaded on the main thread.\n * @hidden\n */\n constructor(source: VideoSource, useSynchronousReplace?: boolean);\n\n /**\n * Resumes the player.\n */\n play(): void;\n\n /**\n * Pauses the player.\n */\n pause(): void;\n\n /**\n * Replaces the current source with a new one.\n *\n * > On iOS, this method loads the asset data synchronously on the UI thread and can block it for extended periods of time.\n * > Use `replaceAsync` to load the asset asynchronously and avoid UI lags.\n *\n * > This method will be deprecated in the future.\n */\n replace(source: VideoSource, disableWarning?: boolean): void;\n\n /**\n * Replaces the current source with a new one, while offloading loading of the asset to a different thread.\n *\n * > On Android and Web, this method is equivalent to `replace`.\n */\n replaceAsync(source: VideoSource): Promise<void>;\n\n /**\n * Seeks the playback by the given number of seconds. The time to which the player seeks may differ from the specified requested time for efficiency,\n * depending on the encoding and what is currently buffered by the player. Use this function to implement playback controls that seek by specific amount of time,\n * in which case, the actual time usually does not have to be precise. For frame accurate seeking, use the [`currentTime`](#currenttime) property.\n */\n seekBy(seconds: number): void;\n\n /**\n * Seeks the playback to the beginning.\n */\n replay(): void;\n\n /**\n * Generates thumbnails from the currently played asset. The thumbnails are references to native images,\n * thus they can be used as a source of the `Image` component from `expo-image`.\n * @platform android\n * @platform ios\n */\n generateThumbnailsAsync(\n times: number | number[],\n options?: VideoThumbnailOptions\n ): Promise<VideoThumbnail[]>;\n}\n\n/**\n * Additional options for video thumbnails generation.\n */\nexport type VideoThumbnailOptions = {\n /**\n * If provided, the generated thumbnail will not exceed this width in pixels, preserving its aspect ratio.\n * @platform android\n * @platform ios\n */\n maxWidth?: number;\n\n /**\n * If provided, the generated thumbnail will not exceed this height in pixels, preserving its aspect ratio.\n * @platform android\n * @platform ios\n */\n maxHeight?: number;\n};\n\n/**\n * Describes the current status of the player.\n * - `idle`: The player is not playing or loading any videos.\n * - `loading`: The player is loading video data from the provided source\n * - `readyToPlay`: The player has loaded enough data to start playing or to continue playback.\n * - `error`: The player has encountered an error while loading or playing the video.\n */\nexport type VideoPlayerStatus = 'idle' | 'loading' | 'readyToPlay' | 'error';\n\nexport type VideoSource =\n | string\n | number\n | null\n | {\n /**\n * The URI of the video.\n *\n * This property is exclusive with the `assetId` property. When both are present, the `assetId` will be ignored.\n */\n uri?: string;\n\n /**\n * The asset ID of a local video asset, acquired with the `require` function.\n * This property is exclusive with the `uri` property. When both are present, the `assetId` will be ignored.\n */\n assetId?: number;\n\n /**\n * Specifies the DRM options which will be used by the player while loading the video.\n */\n drm?: DRMOptions;\n\n /**\n * Specifies information which will be displayed in the now playing notification.\n * When undefined the player will display information contained in the video metadata.\n * @platform android\n * @platform ios\n */\n metadata?: VideoMetadata;\n\n /**\n * Specifies headers sent with the video request.\n * > For DRM license headers use the `headers` field of [`DRMOptions`](#drmoptions).\n * @platform android\n * @platform ios\n */\n headers?: Record<string, string>;\n\n /**\n * Specifies whether the player should use caching for the video.\n * > Due to platform limitations, the cache cannot be used with HLS video sources on iOS. Caching DRM-protected videos is not supported on Android and iOS.\n * @default false\n * @platform android\n * @platform ios\n */\n useCaching?: boolean;\n\n /**\n * Specifies the content type of the video source. When set to `'auto'`, the player will try to automatically determine the content type.\n *\n * You should use this property when playing HLS, SmoothStreaming or DASH videos from an uri, which does not contain a standardized extension for the corresponding media type.\n * @default 'auto'\n * @platform android\n * @platform ios\n */\n contentType?: ContentType;\n };\n\n/**\n * Contains information about any errors that the player encountered during the playback\n */\nexport type PlayerError = {\n message: string;\n};\n\n/**\n * Contains information that will be displayed in the now playing notification when the video is playing.\n * @platform android\n * @platform ios\n */\nexport type VideoMetadata = {\n /**\n * The title of the video.\n * @platform android\n * @platform ios\n */\n title?: string;\n /**\n * Secondary text that will be displayed under the title.\n * @platform android\n * @platform ios\n */\n artist?: string;\n /**\n * The uri of the video artwork.\n * @platform android\n * @platform ios\n */\n artwork?: string;\n};\n\n/**\n * Specifies which type of DRM to use:\n * - Android supports ClearKey, PlayReady and Widevine.\n * - iOS supports FairPlay.\n */\nexport type DRMType = 'clearkey' | 'fairplay' | 'playready' | 'widevine';\n\n/**\n * Specifies DRM options which will be used by the player while loading the video.\n */\nexport type DRMOptions = {\n /**\n * Determines which type of DRM to use.\n */\n type: DRMType;\n\n /**\n * Determines the license server URL.\n */\n licenseServer: string;\n\n /**\n * Determines headers sent to the license server on license requests.\n */\n headers?: Record<string, string>;\n\n /**\n * Specifies whether the DRM is a multi-key DRM.\n * @platform android\n */\n multiKey?: boolean;\n\n /**\n * Specifies the content ID of the stream.\n * @platform ios\n */\n contentId?: string;\n\n /**\n * Specifies the certificate URL for the FairPlay DRM.\n * @platform ios\n */\n certificateUrl?: string;\n\n /**\n * Specifies the base64 encoded certificate data for the FairPlay DRM.\n * When this property is set, the `certificateUrl` property is ignored.\n * @platform ios\n */\n base64CertificateData?: string;\n};\n\n/**\n * Specifies buffer options which will be used by the player when buffering the video.\n *\n * @platform android\n * @platform ios\n */\nexport type BufferOptions = {\n /**\n * The duration in seconds which determines how much media the player should buffer ahead of the current playback time.\n *\n * On iOS when set to `0` the player will automatically decide appropriate buffer duration.\n *\n * Equivalent to [`AVPlayerItem.preferredForwardBufferDuration`](https://developer.apple.com/documentation/avfoundation/avplayeritem/1643630-preferredforwardbufferduration).\n * @default Android: 20, iOS: 0\n * @platform android\n * @platform ios\n */\n readonly preferredForwardBufferDuration?: number;\n\n /**\n * A Boolean value that indicates whether the player should automatically delay playback in order to minimize stalling.\n *\n * Equivalent to [`AVPlayer.automaticallyWaitsToMinimizeStalling`](https://developer.apple.com/documentation/avfoundation/avplayer/1643482-automaticallywaitstominimizestal).\n * @default true\n * @platform ios\n */\n readonly waitsToMinimizeStalling?: boolean;\n\n /**\n * Minimum duration of the buffer in seconds required to continue playing after the player has been paused or started buffering.\n *\n * > This property will be ignored if `preferredForwardBufferDuration` is lower.\n * @default 2\n * @platform android\n */\n readonly minBufferForPlayback?: number;\n\n /**\n * The maximum number of bytes that the player can buffer from the network.\n * When 0 the player will automatically decide appropriate buffer size.\n *\n * @default 0\n * @platform android\n */\n readonly maxBufferBytes?: number | null;\n\n /**\n * A Boolean value which determines whether the player should prioritize time over size when buffering media.\n *\n * @default false\n * @platform android\n */\n readonly prioritizeTimeOverSizeThreshold?: boolean;\n};\n\n/**\n * Specifies the content type of the source.\n *\n * - `auto`: The player will automatically determine the content type of the video.\n * - `progressive`: The player will use progressive download content type. This is the default `ContentType` when the uri does not contain an extension.\n * - `hls`: The player will use HLS content type.\n * - `dash`: The player will use DASH content type (Android-only).\n * - `smoothStreaming`: The player will use SmoothStreaming content type (Android-only).\n *\n * @default `auto`\n */\nexport type ContentType = 'auto' | 'progressive' | 'hls' | 'dash' | 'smoothStreaming';\n\n/**\n * Specifies the audio mode that the player should use. Audio mode is set on per-app basis, if there are multiple players playing and\n * have different a `AudioMode` specified, the highest priority mode will be used. Priority order: 'doNotMix' > 'auto' > 'duckOthers' > 'mixWithOthers'.\n *\n * - `mixWithOthers`: The player will mix its audio output with other apps.\n * - `duckOthers`: The player will lower the volume of other apps if any of the active players is outputting audio.\n * - `auto`: The player will allow other apps to keep playing audio only when it is muted. On iOS it will always interrupt other apps when `showNowPlayingNotification` is `true` due to system requirements.\n * - `doNotMix`: The player will pause playback in other apps, even when it's muted.\n *\n * > On iOS, the Now Playing notification is dependent on the audio mode. If the audio mode is different from `doNotMix` or `auto` this feature will not work.\n */\nexport type AudioMixingMode = 'mixWithOthers' | 'duckOthers' | 'auto' | 'doNotMix';\n\nexport type SubtitleTrack = {\n /**\n * A string used by `expo-video` to identify the subtitle track.\n *\n * @platform android\n */\n id: string;\n\n /**\n * Language of the subtitle track. For example, `en`, `pl`, `de`.\n */\n language: string;\n\n /**\n * Label of the subtitle track in the language of the device.\n */\n label: string;\n};\n\n/**\n * Specifies a VideoTrack loaded from a [`VideoSource`](#videosource).\n */\nexport type VideoTrack = {\n /**\n * The id of the video track.\n *\n * > This field is platform-specific and may return different depending on the operating system.\n */\n id: string;\n\n /**\n * Size of the video track.\n */\n size: VideoSize;\n\n /**\n * MimeType of the video track or null if unknown.\n */\n mimeType: string | null;\n\n /**\n * Indicates whether the video track format is supported by the device.\n *\n * @platform android\n */\n isSupported: boolean;\n\n /**\n * Specifies the bitrate in bits per second. This is the peak bitrate if known, or else the average bitrate if known, or else null.\n */\n bitrate: number | null;\n\n /**\n * Specifies the frame rate of the video track in frames per second.\n */\n frameRate: number | null;\n};\n\n/**\n * Specifies the size of a video track.\n */\nexport type VideoSize = {\n /**\n * Width of the video track in pixels.\n */\n width: number;\n /**\n * Height of the video track in pixels.\n */\n height: number;\n};\n\nexport type AudioTrack = {\n /**\n * A string used by expo-video to identify the audio track.\n * @platform android\n */\n id: string;\n\n /**\n * Language of the audio track. For example, 'en', 'pl', 'de'.\n */\n language: string;\n\n /**\n * Label of the audio track in the language of the device.\n */\n label: string;\n};\n"]}
1
+ {"version":3,"file":"VideoPlayer.types.js","sourceRoot":"","sources":["../src/VideoPlayer.types.ts"],"names":[],"mappings":"","sourcesContent":["import { SharedObject } from 'expo';\n\nimport { VideoPlayerEvents } from './VideoPlayerEvents.types';\nimport { VideoThumbnail } from './VideoThumbnail';\n\n/**\n * A class that represents an instance of the video player.\n */\nexport declare class VideoPlayer extends SharedObject<VideoPlayerEvents> {\n /**\n * Boolean value whether the player is currently playing.\n * > Use `play` and `pause` methods to control the playback.\n */\n readonly playing: boolean;\n\n /**\n * Determines whether the player should automatically replay after reaching the end of the video.\n * @default false\n */\n loop: boolean;\n\n /**\n * Determines whether the player should allow external playback.\n * @default true\n * @platform ios\n */\n allowsExternalPlayback: boolean;\n\n /**\n * Determines how the player will interact with other audio playing in the system.\n *\n * @default 'auto'\n * @platform android\n * @platform ios\n */\n audioMixingMode: AudioMixingMode;\n\n /**\n * Boolean value whether the player is currently muted.\n * Setting this property to `true`/`false` will mute/unmute the player.\n * @default false\n */\n muted: boolean;\n\n /**\n * Float value indicating the current playback time in seconds.\n *\n * If the player is not yet playing, this value indicates the time position\n * at which playback will begin once the `play()` method is called.\n *\n * Setting `currentTime` to a new value seeks the player to the given time.\n * Note that frame accurate seeking may incur additional decoding delay which can impact seeking performance.\n * Consider using the [`seekBy`](#seekbyseconds) function if the time does not have to be set precisely.\n */\n currentTime: number;\n\n /**\n * The exact timestamp when the currently displayed video frame was sent from the server,\n * based on the `EXT-X-PROGRAM-DATE-TIME` tag in the livestream metadata.\n * If this metadata is missing, this property will return `null`.\n * @platform android\n * @platform ios\n */\n readonly currentLiveTimestamp: number | null;\n\n /**\n * Float value indicating the latency of the live stream in seconds.\n * If a livestream doesn't have the required metadata, this will return `null`.\n * @platform android\n * @platform ios\n */\n readonly currentOffsetFromLive: number | null;\n\n /**\n * Float value indicating the time offset from the live in seconds.\n * @platform ios\n */\n targetOffsetFromLive: number;\n\n /**\n * Float value indicating the duration of the current video in seconds.\n */\n readonly duration: number;\n\n /**\n * Float value between `0` and `1.0` representing the current volume.\n * Muting the player doesn't affect the volume. In other words, when the player is muted, the volume is the same as\n * when unmuted. Similarly, setting the volume doesn't unmute the player.\n * @default 1.0\n */\n volume: number;\n\n /**\n * Boolean value indicating if the player should correct audio pitch when the playback speed changes.\n * @default true\n */\n preservesPitch: boolean;\n\n /**\n * Float value indicating the interval in seconds at which the player will emit the [`timeUpdate`](#videoplayerevents) event.\n * When the value is equal to `0`, the event will not be emitted.\n *\n * @default 0\n */\n timeUpdateEventInterval: number;\n\n /**\n * Float value between `0` and `16.0` indicating the current playback speed of the player.\n * @default 1.0\n */\n playbackRate: number;\n\n /**\n * Boolean indicating if the player should keep the screen on while playing.\n *\n * > On Android, this property has an effect only when a [`VideoView`](#videoview) is visible. If you want to keep the screen awake at all times use [`expo-keep-awake`](./keep-awake/).\n *\n * @default true\n * @platform android\n * @platform ios\n */\n keepScreenOnWhilePlaying: boolean;\n\n /**\n * Boolean value indicating whether the player is currently playing a live stream.\n */\n readonly isLive: boolean;\n\n /**\n * Indicates the current status of the player.\n */\n readonly status: VideoPlayerStatus;\n\n /**\n * Boolean value determining whether the player should show the now playing notification.\n *\n * @default false\n * @platform android\n * @platform ios\n */\n showNowPlayingNotification: boolean;\n\n /**\n * Determines whether the player should continue playing after the app enters the background.\n * @default false\n * @platform ios\n * @platform android\n */\n staysActiveInBackground: boolean;\n\n /**\n * Float value indicating how far the player has buffered the video in seconds.\n *\n * This value is 0 when the player has not buffered up to the current playback time.\n * When it's impossible to determine the buffer state (for example, when the player isn't playing any media), this value is -1.\n */\n readonly bufferedPosition: number;\n\n /**\n * Specifies buffer options which will be used by the player when buffering the video.\n *\n * > You should provide a `BufferOptions` object when setting this property. Setting individual buffer properties is not supported.\n * @platform android\n * @platform ios\n */\n bufferOptions: BufferOptions;\n\n /**\n * Specifies the subtitle track which is currently displayed by the player. `null` when no subtitles are displayed.\n *\n * > To ensure a valid subtitle track, always assign one of the subtitle tracks from the [`availableSubtitleTracks`](#availablesubtitletracks) array.\n *\n * @default null\n * @platform android\n * @platform ios\n */\n subtitleTrack: SubtitleTrack | null;\n\n /**\n * Specifies the audio track currently played by the player. `null` when no audio is played.\n *\n * @default null\n * @platform android\n * @platform ios\n */\n audioTrack: AudioTrack | null;\n\n /**\n * An array of audio tracks available for the current video.\n *\n * @platform android\n * @platform ios\n */\n readonly availableAudioTracks: AudioTrack[];\n\n /**\n * An array of subtitle tracks available for the current video.\n *\n * @platform android\n * @platform ios\n */\n readonly availableSubtitleTracks: SubtitleTrack[];\n\n /**\n * Specifies the video track currently played by the player. `null` when no video is displayed.\n *\n * @default null\n * @platform android\n * @platform ios\n */\n readonly videoTrack: VideoTrack | null;\n\n /**\n * An array of video tracks available for the current video.\n *\n * > On iOS, when using a HLS source, make sure that the uri contains `.m3u8` extension or that the [`contentType`](#contenttype) property of the [`VideoSource`](#videosource) has been set to `'hls'`. Otherwise, the video tracks will not be available.\n *\n * @platform android\n * @platform ios\n */\n readonly availableVideoTracks: VideoTrack[];\n\n /**\n * Indicates whether the player is currently playing back the media to an external device via AirPlay.\n *\n * @platform ios\n */\n readonly isExternalPlaybackActive: boolean;\n\n /**\n * Initializes a new video player instance with the given source.\n *\n * @param source The source of the video to be played.\n * @param useSynchronousReplace Optional parameter, when `true` `source` from the first parameter will be loaded on the main thread.\n * @hidden\n */\n constructor(source: VideoSource, useSynchronousReplace?: boolean);\n\n /**\n * Resumes the player.\n */\n play(): void;\n\n /**\n * Pauses the player.\n */\n pause(): void;\n\n /**\n * Replaces the current source with a new one.\n *\n * > On iOS, this method loads the asset data synchronously on the UI thread and can block it for extended periods of time.\n * > Use `replaceAsync` to load the asset asynchronously and avoid UI lags.\n *\n * > This method will be deprecated in the future.\n */\n replace(source: VideoSource, disableWarning?: boolean): void;\n\n /**\n * Replaces the current source with a new one, while offloading loading of the asset to a different thread.\n *\n * > On Android and Web, this method is equivalent to `replace`.\n */\n replaceAsync(source: VideoSource): Promise<void>;\n\n /**\n * Seeks the playback by the given number of seconds. The time to which the player seeks may differ from the specified requested time for efficiency,\n * depending on the encoding and what is currently buffered by the player. Use this function to implement playback controls that seek by specific amount of time,\n * in which case, the actual time usually does not have to be precise. For frame accurate seeking, use the [`currentTime`](#currenttime) property.\n */\n seekBy(seconds: number): void;\n\n /**\n * Seeks the playback to the beginning.\n */\n replay(): void;\n\n /**\n * Generates thumbnails from the currently played asset. The thumbnails are references to native images,\n * thus they can be used as a source of the `Image` component from `expo-image`.\n * @platform android\n * @platform ios\n */\n generateThumbnailsAsync(\n times: number | number[],\n options?: VideoThumbnailOptions\n ): Promise<VideoThumbnail[]>;\n}\n\n/**\n * Additional options for video thumbnails generation.\n */\nexport type VideoThumbnailOptions = {\n /**\n * If provided, the generated thumbnail will not exceed this width in pixels, preserving its aspect ratio.\n * @platform android\n * @platform ios\n */\n maxWidth?: number;\n\n /**\n * If provided, the generated thumbnail will not exceed this height in pixels, preserving its aspect ratio.\n * @platform android\n * @platform ios\n */\n maxHeight?: number;\n};\n\n/**\n * Describes the current status of the player.\n * - `idle`: The player is not playing or loading any videos.\n * - `loading`: The player is loading video data from the provided source\n * - `readyToPlay`: The player has loaded enough data to start playing or to continue playback.\n * - `error`: The player has encountered an error while loading or playing the video.\n */\nexport type VideoPlayerStatus = 'idle' | 'loading' | 'readyToPlay' | 'error';\n\nexport type VideoSource =\n | string\n | number\n | null\n | {\n /**\n * The URI of the video.\n *\n * This property is exclusive with the `assetId` property. When both are present, the `assetId` will be ignored.\n */\n uri?: string;\n\n /**\n * The asset ID of a local video asset, acquired with the `require` function.\n * This property is exclusive with the `uri` property. When both are present, the `assetId` will be ignored.\n */\n assetId?: number;\n\n /**\n * Specifies the DRM options which will be used by the player while loading the video.\n */\n drm?: DRMOptions;\n\n /**\n * Specifies information which will be displayed in the now playing notification.\n * When undefined the player will display information contained in the video metadata.\n * @platform android\n * @platform ios\n */\n metadata?: VideoMetadata;\n\n /**\n * Specifies headers sent with the video request.\n * > For DRM license headers use the `headers` field of [`DRMOptions`](#drmoptions).\n * @platform android\n * @platform ios\n */\n headers?: Record<string, string>;\n\n /**\n * Specifies whether the player should use caching for the video.\n * > Due to platform limitations, the cache cannot be used with HLS video sources on iOS. Caching DRM-protected videos is not supported on Android and iOS.\n * @default false\n * @platform android\n * @platform ios\n */\n useCaching?: boolean;\n\n /**\n * Specifies the content type of the video source. When set to `'auto'`, the player will try to automatically determine the content type.\n *\n * You should use this property when playing HLS, SmoothStreaming or DASH videos from an uri, which does not contain a standardized extension for the corresponding media type.\n * @default 'auto'\n * @platform android\n * @platform ios\n */\n contentType?: ContentType;\n };\n\n/**\n * Contains information about any errors that the player encountered during the playback\n */\nexport type PlayerError = {\n message: string;\n};\n\n/**\n * Contains information that will be displayed in the now playing notification when the video is playing.\n * @platform android\n * @platform ios\n */\nexport type VideoMetadata = {\n /**\n * The title of the video.\n * @platform android\n * @platform ios\n */\n title?: string;\n /**\n * Secondary text that will be displayed under the title.\n * @platform android\n * @platform ios\n */\n artist?: string;\n /**\n * The uri of the video artwork.\n * @platform android\n * @platform ios\n */\n artwork?: string;\n};\n\n/**\n * Specifies which type of DRM to use:\n * - Android supports ClearKey, PlayReady and Widevine.\n * - iOS supports FairPlay.\n */\nexport type DRMType = 'clearkey' | 'fairplay' | 'playready' | 'widevine';\n\n/**\n * Specifies DRM options which will be used by the player while loading the video.\n */\nexport type DRMOptions = {\n /**\n * Determines which type of DRM to use.\n */\n type: DRMType;\n\n /**\n * Determines the license server URL.\n */\n licenseServer: string;\n\n /**\n * Determines headers sent to the license server on license requests.\n */\n headers?: Record<string, string>;\n\n /**\n * Specifies whether the DRM is a multi-key DRM.\n * @platform android\n */\n multiKey?: boolean;\n\n /**\n * Specifies the content ID of the stream.\n * @platform ios\n */\n contentId?: string;\n\n /**\n * Specifies the certificate URL for the FairPlay DRM.\n * @platform ios\n */\n certificateUrl?: string;\n\n /**\n * Specifies the base64 encoded certificate data for the FairPlay DRM.\n * When this property is set, the `certificateUrl` property is ignored.\n * @platform ios\n */\n base64CertificateData?: string;\n};\n\n/**\n * Specifies buffer options which will be used by the player when buffering the video.\n *\n * @platform android\n * @platform ios\n */\nexport type BufferOptions = {\n /**\n * The duration in seconds which determines how much media the player should buffer ahead of the current playback time.\n *\n * On iOS when set to `0` the player will automatically decide appropriate buffer duration.\n *\n * Equivalent to [`AVPlayerItem.preferredForwardBufferDuration`](https://developer.apple.com/documentation/avfoundation/avplayeritem/1643630-preferredforwardbufferduration).\n * @default Android: 20, iOS: 0\n * @platform android\n * @platform ios\n */\n readonly preferredForwardBufferDuration?: number;\n\n /**\n * A Boolean value that indicates whether the player should automatically delay playback in order to minimize stalling.\n *\n * Equivalent to [`AVPlayer.automaticallyWaitsToMinimizeStalling`](https://developer.apple.com/documentation/avfoundation/avplayer/1643482-automaticallywaitstominimizestal).\n * @default true\n * @platform ios\n */\n readonly waitsToMinimizeStalling?: boolean;\n\n /**\n * Minimum duration of the buffer in seconds required to continue playing after the player has been paused or started buffering.\n *\n * > This property will be ignored if `preferredForwardBufferDuration` is lower.\n * @default 2\n * @platform android\n */\n readonly minBufferForPlayback?: number;\n\n /**\n * The maximum number of bytes that the player can buffer from the network.\n * When 0 the player will automatically decide appropriate buffer size.\n *\n * @default 0\n * @platform android\n */\n readonly maxBufferBytes?: number | null;\n\n /**\n * A Boolean value which determines whether the player should prioritize time over size when buffering media.\n *\n * @default false\n * @platform android\n */\n readonly prioritizeTimeOverSizeThreshold?: boolean;\n};\n\n/**\n * Specifies the content type of the source.\n *\n * - `auto`: The player will automatically determine the content type of the video.\n * - `progressive`: The player will use progressive download content type. This is the default `ContentType` when the uri does not contain an extension.\n * - `hls`: The player will use HLS content type.\n * - `dash`: The player will use DASH content type (Android-only).\n * - `smoothStreaming`: The player will use SmoothStreaming content type (Android-only).\n *\n * @default `auto`\n */\nexport type ContentType = 'auto' | 'progressive' | 'hls' | 'dash' | 'smoothStreaming';\n\n/**\n * Specifies the audio mode that the player should use. Audio mode is set on per-app basis, if there are multiple players playing and\n * have different a `AudioMode` specified, the highest priority mode will be used. Priority order: 'doNotMix' > 'auto' > 'duckOthers' > 'mixWithOthers'.\n *\n * - `mixWithOthers`: The player will mix its audio output with other apps.\n * - `duckOthers`: The player will lower the volume of other apps if any of the active players is outputting audio.\n * - `auto`: The player will allow other apps to keep playing audio only when it is muted. On iOS it will always interrupt other apps when `showNowPlayingNotification` is `true` due to system requirements.\n * - `doNotMix`: The player will pause playback in other apps, even when it's muted.\n *\n * > On iOS, the Now Playing notification is dependent on the audio mode. If the audio mode is different from `doNotMix` or `auto` this feature will not work.\n */\nexport type AudioMixingMode = 'mixWithOthers' | 'duckOthers' | 'auto' | 'doNotMix';\n\nexport type SubtitleTrack = {\n /**\n * A string used by `expo-video` to identify the subtitle track.\n *\n * @platform android\n */\n id: string;\n\n /**\n * Language of the subtitle track. For example, `en`, `pl`, `de`.\n */\n language: string;\n\n /**\n * Label of the subtitle track in the language of the device.\n */\n label: string;\n};\n\n/**\n * Specifies a VideoTrack loaded from a [`VideoSource`](#videosource).\n */\nexport type VideoTrack = {\n /**\n * The id of the video track.\n *\n * > This field is platform-specific and may return different depending on the operating system.\n */\n id: string;\n\n /**\n * Size of the video track.\n */\n size: VideoSize;\n\n /**\n * MimeType of the video track or null if unknown.\n */\n mimeType: string | null;\n\n /**\n * Indicates whether the video track format is supported by the device.\n *\n * @platform android\n */\n isSupported: boolean;\n\n /**\n * Specifies the bitrate in bits per second. This is the peak bitrate if known, or else the average bitrate if known, or else null.\n */\n bitrate: number | null;\n\n /**\n * Specifies the frame rate of the video track in frames per second.\n */\n frameRate: number | null;\n};\n\n/**\n * Specifies the size of a video track.\n */\nexport type VideoSize = {\n /**\n * Width of the video track in pixels.\n */\n width: number;\n /**\n * Height of the video track in pixels.\n */\n height: number;\n};\n\nexport type AudioTrack = {\n /**\n * A string used by expo-video to identify the audio track.\n * @platform android\n */\n id: string;\n\n /**\n * Language of the audio track. For example, 'en', 'pl', 'de'.\n */\n language: string;\n\n /**\n * Label of the audio track in the language of the device.\n */\n label: string;\n};\n"]}
@@ -35,6 +35,7 @@ export default class VideoPlayerWeb extends globalThis.expo.SharedObject<VideoPl
35
35
  videoTrack: VideoTrack | null;
36
36
  availableVideoTracks: VideoTrack[];
37
37
  isExternalPlaybackActive: boolean;
38
+ keepScreenOnWhilePlaying: boolean;
38
39
  set muted(value: boolean);
39
40
  get muted(): boolean;
40
41
  set playbackRate(value: number);
@@ -1 +1 @@
1
- {"version":3,"file":"VideoPlayer.web.d.ts","sourceRoot":"","sources":["../src/VideoPlayer.web.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EACV,aAAa,EACb,WAAW,EACX,iBAAiB,EACjB,WAAW,EACX,WAAW,EACX,aAAa,EACb,eAAe,EACf,UAAU,EACV,UAAU,EACX,MAAM,qBAAqB,CAAC;AAC7B,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,2BAA2B,CAAC;AACnE,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAGlD,wBAAgB,cAAc,CAC5B,MAAM,EAAE,WAAW,EACnB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,MAAM,CAAC,OAAO,EAAE,MAAM,GAAG,IAAI;IAM7B,MAAM,IAAI,IAAI;IAQd,uBAAuB,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,EAAE,GAAG,OAAO,CAAC,cAAc,EAAE,CAAC;IAI5E,0BAA0B,CAAC,KAAK,EAAE,gBAAgB,GAAG,IAAI;IAezD;;;OAGG;IACH,SAAS,CAAC,SAAS,SAAS,MAAM,iBAAiB,EACjD,WAAW,EAAE,gBAAgB,EAC7B,SAAS,EAAE,SAAS,EACpB,GAAG,IAAI,EAAE,UAAU,CAAC,iBAAiB,CAAC,SAAS,CAAC,CAAC,GAChD,IAAI;IAOP,aAAa,CAAC,KAAK,EAAE,gBAAgB,GAAG,IAAI;CAsF7C"}
@@ -58,6 +58,7 @@ export default class VideoPlayerWeb extends globalThis.expo.SharedObject {
58
58
  videoTrack = null; // Not supported on web. Dummy to match the interface.
59
59
  availableVideoTracks = []; // Not supported on web. Dummy to match the interface.
60
60
  isExternalPlaybackActive = false; // Not supported on web. Dummy to match the interface.
61
+ keepScreenOnWhilePlaying = false; // Not supported on web. Dummy to match the interface
61
62
  set muted(value) {
62
63
  this._mountedVideos.forEach((video) => {
63
64
  video.muted = value;