expo-video 3.1.0-canary-20251206-615dec1 → 3.1.0-canary-20251211-7da85ea

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 (54) hide show
  1. package/CHANGELOG.md +4 -0
  2. package/android/build.gradle +2 -2
  3. package/android/src/main/java/expo/modules/video/VideoModule.kt +8 -20
  4. package/android/src/main/java/expo/modules/video/player/VideoPlayer.kt +15 -5
  5. package/android/src/main/java/expo/modules/video/records/Tracks.kt +9 -3
  6. package/build/VideoPlayer.types.d.ts +15 -3
  7. package/build/VideoPlayer.types.d.ts.map +1 -1
  8. package/build/VideoPlayer.types.js.map +1 -1
  9. package/expo-module.config.json +1 -1
  10. package/ios/Records/Tracks.swift +71 -9
  11. package/local-maven-repo/host/exp/exponent/expo.modules.video/{3.1.0-canary-20251206-615dec1/expo.modules.video-3.1.0-canary-20251206-615dec1-sources.jar → 3.1.0-canary-20251211-7da85ea/expo.modules.video-3.1.0-canary-20251211-7da85ea-sources.jar} +0 -0
  12. package/local-maven-repo/host/exp/exponent/expo.modules.video/3.1.0-canary-20251211-7da85ea/expo.modules.video-3.1.0-canary-20251211-7da85ea-sources.jar.md5 +1 -0
  13. package/local-maven-repo/host/exp/exponent/expo.modules.video/3.1.0-canary-20251211-7da85ea/expo.modules.video-3.1.0-canary-20251211-7da85ea-sources.jar.sha1 +1 -0
  14. package/local-maven-repo/host/exp/exponent/expo.modules.video/3.1.0-canary-20251211-7da85ea/expo.modules.video-3.1.0-canary-20251211-7da85ea-sources.jar.sha256 +1 -0
  15. package/local-maven-repo/host/exp/exponent/expo.modules.video/3.1.0-canary-20251211-7da85ea/expo.modules.video-3.1.0-canary-20251211-7da85ea-sources.jar.sha512 +1 -0
  16. package/local-maven-repo/host/exp/exponent/expo.modules.video/3.1.0-canary-20251211-7da85ea/expo.modules.video-3.1.0-canary-20251211-7da85ea.aar +0 -0
  17. package/local-maven-repo/host/exp/exponent/expo.modules.video/3.1.0-canary-20251211-7da85ea/expo.modules.video-3.1.0-canary-20251211-7da85ea.aar.md5 +1 -0
  18. package/local-maven-repo/host/exp/exponent/expo.modules.video/3.1.0-canary-20251211-7da85ea/expo.modules.video-3.1.0-canary-20251211-7da85ea.aar.sha1 +1 -0
  19. package/local-maven-repo/host/exp/exponent/expo.modules.video/3.1.0-canary-20251211-7da85ea/expo.modules.video-3.1.0-canary-20251211-7da85ea.aar.sha256 +1 -0
  20. package/local-maven-repo/host/exp/exponent/expo.modules.video/3.1.0-canary-20251211-7da85ea/expo.modules.video-3.1.0-canary-20251211-7da85ea.aar.sha512 +1 -0
  21. package/local-maven-repo/host/exp/exponent/expo.modules.video/{3.1.0-canary-20251206-615dec1/expo.modules.video-3.1.0-canary-20251206-615dec1.module → 3.1.0-canary-20251211-7da85ea/expo.modules.video-3.1.0-canary-20251211-7da85ea.module} +22 -22
  22. package/local-maven-repo/host/exp/exponent/expo.modules.video/3.1.0-canary-20251211-7da85ea/expo.modules.video-3.1.0-canary-20251211-7da85ea.module.md5 +1 -0
  23. package/local-maven-repo/host/exp/exponent/expo.modules.video/3.1.0-canary-20251211-7da85ea/expo.modules.video-3.1.0-canary-20251211-7da85ea.module.sha1 +1 -0
  24. package/local-maven-repo/host/exp/exponent/expo.modules.video/3.1.0-canary-20251211-7da85ea/expo.modules.video-3.1.0-canary-20251211-7da85ea.module.sha256 +1 -0
  25. package/local-maven-repo/host/exp/exponent/expo.modules.video/3.1.0-canary-20251211-7da85ea/expo.modules.video-3.1.0-canary-20251211-7da85ea.module.sha512 +1 -0
  26. package/local-maven-repo/host/exp/exponent/expo.modules.video/{3.1.0-canary-20251206-615dec1/expo.modules.video-3.1.0-canary-20251206-615dec1.pom → 3.1.0-canary-20251211-7da85ea/expo.modules.video-3.1.0-canary-20251211-7da85ea.pom} +1 -1
  27. package/local-maven-repo/host/exp/exponent/expo.modules.video/3.1.0-canary-20251211-7da85ea/expo.modules.video-3.1.0-canary-20251211-7da85ea.pom.md5 +1 -0
  28. package/local-maven-repo/host/exp/exponent/expo.modules.video/3.1.0-canary-20251211-7da85ea/expo.modules.video-3.1.0-canary-20251211-7da85ea.pom.sha1 +1 -0
  29. package/local-maven-repo/host/exp/exponent/expo.modules.video/3.1.0-canary-20251211-7da85ea/expo.modules.video-3.1.0-canary-20251211-7da85ea.pom.sha256 +1 -0
  30. package/local-maven-repo/host/exp/exponent/expo.modules.video/3.1.0-canary-20251211-7da85ea/expo.modules.video-3.1.0-canary-20251211-7da85ea.pom.sha512 +1 -0
  31. package/local-maven-repo/host/exp/exponent/expo.modules.video/maven-metadata.xml +4 -4
  32. package/local-maven-repo/host/exp/exponent/expo.modules.video/maven-metadata.xml.md5 +1 -1
  33. package/local-maven-repo/host/exp/exponent/expo.modules.video/maven-metadata.xml.sha1 +1 -1
  34. package/local-maven-repo/host/exp/exponent/expo.modules.video/maven-metadata.xml.sha256 +1 -1
  35. package/local-maven-repo/host/exp/exponent/expo.modules.video/maven-metadata.xml.sha512 +1 -1
  36. package/package.json +3 -3
  37. package/src/VideoPlayer.types.ts +73 -62
  38. package/local-maven-repo/host/exp/exponent/expo.modules.video/3.1.0-canary-20251206-615dec1/expo.modules.video-3.1.0-canary-20251206-615dec1-sources.jar.md5 +0 -1
  39. package/local-maven-repo/host/exp/exponent/expo.modules.video/3.1.0-canary-20251206-615dec1/expo.modules.video-3.1.0-canary-20251206-615dec1-sources.jar.sha1 +0 -1
  40. package/local-maven-repo/host/exp/exponent/expo.modules.video/3.1.0-canary-20251206-615dec1/expo.modules.video-3.1.0-canary-20251206-615dec1-sources.jar.sha256 +0 -1
  41. package/local-maven-repo/host/exp/exponent/expo.modules.video/3.1.0-canary-20251206-615dec1/expo.modules.video-3.1.0-canary-20251206-615dec1-sources.jar.sha512 +0 -1
  42. package/local-maven-repo/host/exp/exponent/expo.modules.video/3.1.0-canary-20251206-615dec1/expo.modules.video-3.1.0-canary-20251206-615dec1.aar +0 -0
  43. package/local-maven-repo/host/exp/exponent/expo.modules.video/3.1.0-canary-20251206-615dec1/expo.modules.video-3.1.0-canary-20251206-615dec1.aar.md5 +0 -1
  44. package/local-maven-repo/host/exp/exponent/expo.modules.video/3.1.0-canary-20251206-615dec1/expo.modules.video-3.1.0-canary-20251206-615dec1.aar.sha1 +0 -1
  45. package/local-maven-repo/host/exp/exponent/expo.modules.video/3.1.0-canary-20251206-615dec1/expo.modules.video-3.1.0-canary-20251206-615dec1.aar.sha256 +0 -1
  46. package/local-maven-repo/host/exp/exponent/expo.modules.video/3.1.0-canary-20251206-615dec1/expo.modules.video-3.1.0-canary-20251206-615dec1.aar.sha512 +0 -1
  47. package/local-maven-repo/host/exp/exponent/expo.modules.video/3.1.0-canary-20251206-615dec1/expo.modules.video-3.1.0-canary-20251206-615dec1.module.md5 +0 -1
  48. package/local-maven-repo/host/exp/exponent/expo.modules.video/3.1.0-canary-20251206-615dec1/expo.modules.video-3.1.0-canary-20251206-615dec1.module.sha1 +0 -1
  49. package/local-maven-repo/host/exp/exponent/expo.modules.video/3.1.0-canary-20251206-615dec1/expo.modules.video-3.1.0-canary-20251206-615dec1.module.sha256 +0 -1
  50. package/local-maven-repo/host/exp/exponent/expo.modules.video/3.1.0-canary-20251206-615dec1/expo.modules.video-3.1.0-canary-20251206-615dec1.module.sha512 +0 -1
  51. package/local-maven-repo/host/exp/exponent/expo.modules.video/3.1.0-canary-20251206-615dec1/expo.modules.video-3.1.0-canary-20251206-615dec1.pom.md5 +0 -1
  52. package/local-maven-repo/host/exp/exponent/expo.modules.video/3.1.0-canary-20251206-615dec1/expo.modules.video-3.1.0-canary-20251206-615dec1.pom.sha1 +0 -1
  53. package/local-maven-repo/host/exp/exponent/expo.modules.video/3.1.0-canary-20251206-615dec1/expo.modules.video-3.1.0-canary-20251206-615dec1.pom.sha256 +0 -1
  54. package/local-maven-repo/host/exp/exponent/expo.modules.video/3.1.0-canary-20251206-615dec1/expo.modules.video-3.1.0-canary-20251206-615dec1.pom.sha512 +0 -1
package/CHANGELOG.md CHANGED
@@ -8,6 +8,7 @@
8
8
 
9
9
  - [Android][iOS] Add `seek tolerance` and `scrubbingModeOptions` properties to the player. ([#40203](https://github.com/expo/expo/pull/40203) by [@behenate](https://github.com/behenate))
10
10
  - Allow assigning `null` value to the `player` prop of the `VideoView` ([#40860](https://github.com/expo/expo/pull/40860) by [@behenate](https://github.com/behenate))
11
+ - [Android][iOS] Add `averageBitrate` and `peakBitrate` for video tracks. ([#41532](https://github.com/expo/expo/pull/41532) by [@behenate](https://github.com/behenate))
11
12
 
12
13
  ### 🐛 Bug fixes
13
14
 
@@ -20,6 +21,9 @@
20
21
 
21
22
  - [Android] Remove @UnstableReactNativeAPI annotations. ([#39921](https://github.com/expo/expo/pull/39921) by [@jakex7](https://github.com/jakex7))
22
23
  - [iOS] Load track information for events in asynchronous context. ([#40355](https://github.com/expo/expo/pull/40355) by [@behenate](https://github.com/behenate))
24
+ - Add extract the object `VideoSource` type into separate `VideoSourceObject` type. ([#41514](https://github.com/expo/expo/pull/41514) by [@behenate](https://github.com/behenate))
25
+ - [Android] Set property values on calling thread. ([#41533](https://github.com/expo/expo/pull/41533) by [@behenate](https://github.com/behenate))
26
+ - Mark the video track `bitrate` field as deprecated. ([#41532](https://github.com/expo/expo/pull/41532) by [@behenate](https://github.com/behenate))
23
27
 
24
28
  ## 3.0.15 - 2025-12-05
25
29
 
@@ -4,13 +4,13 @@ plugins {
4
4
  }
5
5
 
6
6
  group = 'host.exp.exponent'
7
- version = '3.1.0-canary-20251206-615dec1'
7
+ version = '3.1.0-canary-20251211-7da85ea'
8
8
 
9
9
  android {
10
10
  namespace "expo.modules.video"
11
11
  defaultConfig {
12
12
  versionCode 1
13
- versionName '3.1.0-canary-20251206-615dec1'
13
+ versionName '3.1.0-canary-20251211-7da85ea'
14
14
  }
15
15
  }
16
16
 
@@ -85,9 +85,7 @@ class VideoModule : Module() {
85
85
  ref.muted
86
86
  }
87
87
  .set { ref: VideoPlayer, muted: Boolean ->
88
- appContext.mainQueue.launch {
89
- ref.muted = muted
90
- }
88
+ ref.muted = muted
91
89
  }
92
90
 
93
91
  Property("volume")
@@ -95,10 +93,8 @@ class VideoModule : Module() {
95
93
  ref.volume
96
94
  }
97
95
  .set { ref: VideoPlayer, volume: Float ->
98
- appContext.mainQueue.launch {
99
- ref.userVolume = volume
100
- ref.volume = volume
101
- }
96
+ ref.userVolume = volume
97
+ ref.volume = volume
102
98
  }
103
99
 
104
100
  Property("currentTime")
@@ -180,10 +176,8 @@ class VideoModule : Module() {
180
176
  ref.playbackParameters.speed
181
177
  }
182
178
  .set { ref: VideoPlayer, playbackRate: Float ->
183
- appContext.mainQueue.launch {
184
- val pitch = if (ref.preservesPitch) 1f else playbackRate
185
- ref.playbackParameters = PlaybackParameters(playbackRate, pitch)
186
- }
179
+ val pitch = if (ref.preservesPitch) 1f else playbackRate
180
+ ref.playbackParameters = PlaybackParameters(playbackRate, pitch)
187
181
  }
188
182
 
189
183
  Property("isLive")
@@ -196,9 +190,7 @@ class VideoModule : Module() {
196
190
  ref.preservesPitch
197
191
  }
198
192
  .set { ref: VideoPlayer, preservesPitch: Boolean ->
199
- appContext.mainQueue.launch {
200
- ref.preservesPitch = preservesPitch
201
- }
193
+ ref.preservesPitch = preservesPitch
202
194
  }
203
195
 
204
196
  Property("showNowPlayingNotification")
@@ -206,9 +198,7 @@ class VideoModule : Module() {
206
198
  ref.showNowPlayingNotification
207
199
  }
208
200
  .set { ref: VideoPlayer, showNotification: Boolean ->
209
- appContext.mainQueue.launch {
210
- ref.showNowPlayingNotification = showNotification
211
- }
201
+ ref.showNowPlayingNotification = showNotification
212
202
  }
213
203
 
214
204
  Property("status")
@@ -287,9 +277,7 @@ class VideoModule : Module() {
287
277
  ref.audioMixingMode
288
278
  }
289
279
  .set { ref: VideoPlayer, audioMixingMode: AudioMixingMode ->
290
- appContext.mainQueue.launch {
291
- ref.audioMixingMode = audioMixingMode
292
- }
280
+ ref.audioMixingMode = audioMixingMode
293
281
  }
294
282
 
295
283
  Property("keepScreenOnWhilePlaying")
@@ -101,24 +101,32 @@ class VideoPlayer(val context: Context, appContext: AppContext, source: VideoSou
101
101
  var preservesPitch = false
102
102
  set(preservesPitch) {
103
103
  field = preservesPitch
104
- playbackParameters = applyPitchCorrection(playbackParameters)
104
+ appContext?.mainQueue?.launch {
105
+ playbackParameters = applyPitchCorrection(playbackParameters)
106
+ }
105
107
  }
106
108
  var showNowPlayingNotification = false
107
109
  set(value) {
108
110
  field = value
109
- serviceSetShowNotification(value)
111
+ appContext?.mainQueue?.launch {
112
+ serviceSetShowNotification(value)
113
+ }
110
114
  }
111
115
  var duration = 0f
112
116
  var isLive = false
113
117
 
114
118
  var volume: Float by IgnoreSameSet(1f) { new: Float, old: Float ->
115
- player.volume = if (muted) 0f else new
119
+ appContext.mainQueue.launch {
120
+ player.volume = if (muted) 0f else new
121
+ }
116
122
  userVolume = volume
117
123
  sendEvent(PlayerEvent.VolumeChanged(new, old))
118
124
  }
119
125
 
120
126
  var muted: Boolean by IgnoreSameSet(false) { new: Boolean, old: Boolean ->
121
- player.volume = if (new) 0f else userVolume
127
+ appContext.mainQueue.launch {
128
+ player.volume = if (new) 0f else userVolume
129
+ }
122
130
  sendEvent(PlayerEvent.MutedChanged(new, old))
123
131
  }
124
132
 
@@ -126,7 +134,9 @@ class VideoPlayer(val context: Context, appContext: AppContext, source: VideoSou
126
134
  PlaybackParameters.DEFAULT,
127
135
  propertyMapper = { applyPitchCorrection(it) }
128
136
  ) { new: PlaybackParameters, old: PlaybackParameters ->
129
- player.playbackParameters = new
137
+ appContext.mainQueue.launch {
138
+ player.playbackParameters = new
139
+ }
130
140
 
131
141
  if (old.speed != new.speed) {
132
142
  sendEvent(PlayerEvent.PlaybackRateChanged(new.speed, old.speed))
@@ -56,7 +56,9 @@ class VideoTrack(
56
56
  @Field val size: VideoSize,
57
57
  @Field val mimeType: String?,
58
58
  @Field val isSupported: Boolean = true,
59
- @Field val bitrate: Int? = null,
59
+ @Field val bitrate: Int? = null, // deprecated as of SDK 55
60
+ @Field val averageBitrate: Int? = null,
61
+ @Field val peakBitrate: Int? = null,
60
62
  @Field val frameRate: Float? = null,
61
63
  var format: Format? = null
62
64
  ) : Record, Serializable {
@@ -65,14 +67,18 @@ class VideoTrack(
65
67
  val id = format?.id ?: return null
66
68
  val size = VideoSize(format)
67
69
  val mimeType = format.sampleMimeType
68
- val bitrate = format.bitrate.takeIf { it != Format.NO_VALUE }
70
+ val averageBitrate = format.averageBitrate.takeIf { it != Format.NO_VALUE }
71
+ val peakBitrate = format.peakBitrate.takeIf { it != Format.NO_VALUE }
69
72
  val frameRate = format.frameRate.takeIf { it != Format.NO_VALUE.toFloat() }
73
+
70
74
  return VideoTrack(
71
75
  id = id,
72
76
  size = size,
73
77
  mimeType = mimeType,
74
78
  isSupported = isSupported,
75
- bitrate = bitrate,
79
+ bitrate = averageBitrate ?: peakBitrate,
80
+ averageBitrate = averageBitrate,
81
+ peakBitrate = peakBitrate,
76
82
  frameRate = frameRate,
77
83
  format = format
78
84
  )
@@ -292,7 +292,8 @@ export type VideoThumbnailOptions = {
292
292
  * - `error`: The player has encountered an error while loading or playing the video.
293
293
  */
294
294
  export type VideoPlayerStatus = 'idle' | 'loading' | 'readyToPlay' | 'error';
295
- export type VideoSource = string | number | null | {
295
+ export type VideoSource = string | number | null | VideoSourceObject;
296
+ export type VideoSourceObject = {
296
297
  /**
297
298
  * The URI of the video.
298
299
  *
@@ -497,7 +498,7 @@ export type SubtitleTrack = {
497
498
  *
498
499
  * @platform android
499
500
  */
500
- id: string;
501
+ id?: string;
501
502
  /**
502
503
  * Language of the subtitle track. For example, `en`, `pl`, `de`.
503
504
  */
@@ -533,8 +534,19 @@ export type VideoTrack = {
533
534
  isSupported: boolean;
534
535
  /**
535
536
  * Specifies the bitrate in bits per second. This is the peak bitrate if known, or else the average bitrate if known, or else null.
537
+ *
538
+ * @deprecated Use `peakBitrate` or `averageBitrate` instead.
536
539
  */
537
540
  bitrate: number | null;
541
+ /**
542
+ * Specifies the average bitrate in bits per second or null if the value is unknown.
543
+ *
544
+ */
545
+ averageBitrate: number | null;
546
+ /**
547
+ * Specifies the average bitrate in bits per second or null if the value is unknown.
548
+ */
549
+ peakBitrate: number | null;
538
550
  /**
539
551
  * Specifies the frame rate of the video track in frames per second.
540
552
  */
@@ -558,7 +570,7 @@ export type AudioTrack = {
558
570
  * A string used by expo-video to identify the audio track.
559
571
  * @platform android
560
572
  */
561
- id: string;
573
+ id?: string;
562
574
  /**
563
575
  * Language of the audio track. For example, 'en', 'pl', 'de'.
564
576
  */
@@ -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,CAAC,iBAAiB,CAAC;IACtE;;;OAGG;IACH,QAAQ,CAAC,OAAO,EAAE,OAAO,CAAC;IAE1B;;;OAGG;IACH,IAAI,EAAE,OAAO,CAAC;IAEd;;;;OAIG;IACH,sBAAsB,EAAE,OAAO,CAAC;IAEhC;;;;;;OAMG;IACH,eAAe,EAAE,eAAe,CAAC;IAEjC;;;;OAIG;IACH,KAAK,EAAE,OAAO,CAAC;IAEf;;;;;;;;OAQG;IACH,WAAW,EAAE,MAAM,CAAC;IAEpB;;;;;;OAMG;IACH,QAAQ,CAAC,oBAAoB,EAAE,MAAM,GAAG,IAAI,CAAC;IAE7C;;;;;OAKG;IACH,QAAQ,CAAC,qBAAqB,EAAE,MAAM,GAAG,IAAI,CAAC;IAE9C;;;OAGG;IACH,oBAAoB,EAAE,MAAM,CAAC;IAE7B;;OAEG;IACH,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAC;IAE1B;;;;;OAKG;IAC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,cAAc,CAAC,EAAE,MAAM,CAAC;CACzB,CAAC;AAEF;;GAEG;AACH,MAAM,MAAM,oBAAoB,GAAG;IACjC;;;;;;;;;;;;;;;;OAgBG;IACH,oBAAoB,CAAC,EAAE,OAAO,CAAC;IAE/B;;;;;OAKG;IACH,0BAA0B,CAAC,EAAE,OAAO,CAAC;IAErC;;;;;;OAMG;IACH,uBAAuB,CAAC,EAAE,OAAO,CAAC;IAClC;;;;;;OAMG;IACH,iBAAiB,CAAC,EAAE,OAAO,CAAC;IAE5B;;;;;;OAMG;IACH,4BAA4B,CAAC,EAAE,OAAO,CAAC;CACxC,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 * Check out the [`seekTolerance`](#seektolerance) property to configure the seeking precision.\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 * > **Note**: On Android, `supportsBackgroundPlayback` property of the [config plugin](#configuration-in-app-config)\n * > has to be `true` for the now playing notification to work.\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 *\n * > **Note**: The `supportsBackgroundPlayback` property of the [config plugin](#configuration-in-app-config)\n * > has to be `true` for the background playback to work.\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 * Determines the time that the actual position seeked to may precede or exceed the requested seek position.\n *\n * This property affects the precision of setting the [`currentTime`](#currenttime) property and the [`seekBy`](#seekbyseconds) method, and on Android, it also affects the accuracy of the scrubber from the default native controls.\n *\n * By default, the player seeks to the exact requested time.\n *\n * > If you are trying to optimize for scrubbing (many frequent seeks), also see [`ScrubbingModeOptions`](#scrubbingmodeoptions-1).\n */\n seekTolerance: SeekTolerance;\n\n /**\n * Determines whether the scrubbing mode is enabled and what scrubbing optimizations should be enabled.\n *\n * > See [`SeekTolerance`](#seektolerance) to set the seeking tolerance, which can also affect the scrubbing performance.\n *\n */\n scrubbingModeOptions: ScrubbingModeOptions;\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 * On iOS, `PHAsset` URIs are supported, but can only be loaded using the [`replaceAsync`](#replaceasyncsource) method or the default [`VideoPlayer`](#videoplayer) constructor.\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\n/**\n * Determines the time that the actual position seeked to may precede or exceed the requested seek position.\n * Larger tolerance will usually result in faster seeking.\n * This property affects the precision of setting the [`currentTime`](#currenttime) property and the [`seekBy`](#seekbyseconds) method, and on Android, it also affects the accuracy of the scrubber from the default native controls.\n *\n * > If you are trying to optimize for scrubbing (many frequent seeks), also see [`ScrubbingModeOptions`](#scrubbingmodeoptions-1).\n *\n * @platform android\n * @platform ios\n */\nexport type SeekTolerance = {\n /**\n * The maximum time that the actual position seeked to may precede the requested seek position, in seconds. Must be non-negative.\n * @default 0\n */\n toleranceBefore?: number;\n\n /**\n * The maximum time that the actual position seeked to may exceed the requested seek position, in seconds. Must be non-negative.\n * @default 0\n */\n toleranceAfter?: number;\n};\n\n/**\n * Defines scrubbing mode options used by a [`VideoPlayer`](#videoplayer).\n */\nexport type ScrubbingModeOptions = {\n /**\n * Whether the codec operating rate should be increased in scrubbing mode.\n *\n * You should only enable this when the player is receiving a large number of seeks in a short period of time. For less frequent seeks, fine-tuning the [`SeekTolerance`](#seektolerance-1) may be sufficient.\n *\n * On Android, the player may consume more resources in this mode, so it should only be used for short periods of time in response to user interaction (for example, dragging on a progress bar UI element).\n *\n * On Android, when `scrubbingModeEnabled` is `true`, the playback is suppressed. You should set this property back to `false` when the user interaction ends to allow the playback to resume.\n * For best results, on iOS you should pause the playback when scrubbing.\n *\n * > For best scrubbing performance, consider also increasing the seeking tolerance using the [`SeekTolerance`](#seektolerance-1) property.\n *\n * > Other scrubbing mode options will have no effect when this is `false`.\n * @default false\n * @platform android\n * @platform ios\n */\n scrubbingModeEnabled?: boolean;\n\n /**\n * Whether the codec operating rate should be increased in scrubbing mode.\n *\n * @platform android\n * @default true\n */\n increaseCodecOperatingRate?: boolean;\n\n /**\n * Sets whether ExoPlayer's dynamic scheduling should be enabled in scrubbing mode.\n * This can result in available output buffers being handled more quickly when seeking.\n *\n * @platform android\n * @default true\n */\n enableDynamicScheduling?: boolean;\n /**\n * Sets whether to use `MediaCodec.BUFFER_FLAG_DECODE_ONLY` in scrubbing mode.\n * When playback is using MediaCodec on API 34+, this flag can speed up seeking by signalling that the decoded output of buffers between the previous keyframe and the target frame is not needed by the player.\n *\n * @platform android\n * @default true\n */\n useDecodeOnlyFlag?: boolean;\n\n /**\n * Sets whether to avoid flushing the decoder (where possible) in scrubbing mode.\n * When `true`, avoids flushing the decoder when a new seek starts decoding from a key-frame in compatible content.\n *\n * @platform android\n * @default true\n */\n allowSkippingMediaCodecFlush?: boolean;\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 * Check out the [`seekTolerance`](#seektolerance) property to configure the seeking precision.\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 * > **Note**: On Android, `supportsBackgroundPlayback` property of the [config plugin](#configuration-in-app-config)\n * > has to be `true` for the now playing notification to work.\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 *\n * > **Note**: The `supportsBackgroundPlayback` property of the [config plugin](#configuration-in-app-config)\n * > has to be `true` for the background playback to work.\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 * Determines the time that the actual position seeked to may precede or exceed the requested seek position.\n *\n * This property affects the precision of setting the [`currentTime`](#currenttime) property and the [`seekBy`](#seekbyseconds) method, and on Android, it also affects the accuracy of the scrubber from the default native controls.\n *\n * By default, the player seeks to the exact requested time.\n *\n * > If you are trying to optimize for scrubbing (many frequent seeks), also see [`ScrubbingModeOptions`](#scrubbingmodeoptions-1).\n */\n seekTolerance: SeekTolerance;\n\n /**\n * Determines whether the scrubbing mode is enabled and what scrubbing optimizations should be enabled.\n *\n * > See [`SeekTolerance`](#seektolerance) to set the seeking tolerance, which can also affect the scrubbing performance.\n *\n */\n scrubbingModeOptions: ScrubbingModeOptions;\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 = string | number | null | VideoSourceObject;\n\nexport type VideoSourceObject = {\n /**\n * The URI of the video.\n *\n * On iOS, `PHAsset` URIs are supported, but can only be loaded using the [`replaceAsync`](#replaceasyncsource) method or the default [`VideoPlayer`](#videoplayer) constructor.\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 * @deprecated Use `peakBitrate` or `averageBitrate` instead.\n */\n bitrate: number | null;\n\n /**\n * Specifies the average bitrate in bits per second or null if the value is unknown.\n *\n */\n averageBitrate: number | null;\n\n /**\n * Specifies the average bitrate in bits per second or null if the value is unknown.\n */\n peakBitrate: 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\n/**\n * Determines the time that the actual position seeked to may precede or exceed the requested seek position.\n * Larger tolerance will usually result in faster seeking.\n * This property affects the precision of setting the [`currentTime`](#currenttime) property and the [`seekBy`](#seekbyseconds) method, and on Android, it also affects the accuracy of the scrubber from the default native controls.\n *\n * > If you are trying to optimize for scrubbing (many frequent seeks), also see [`ScrubbingModeOptions`](#scrubbingmodeoptions-1).\n *\n * @platform android\n * @platform ios\n */\nexport type SeekTolerance = {\n /**\n * The maximum time that the actual position seeked to may precede the requested seek position, in seconds. Must be non-negative.\n * @default 0\n */\n toleranceBefore?: number;\n\n /**\n * The maximum time that the actual position seeked to may exceed the requested seek position, in seconds. Must be non-negative.\n * @default 0\n */\n toleranceAfter?: number;\n};\n\n/**\n * Defines scrubbing mode options used by a [`VideoPlayer`](#videoplayer).\n */\nexport type ScrubbingModeOptions = {\n /**\n * Whether the codec operating rate should be increased in scrubbing mode.\n *\n * You should only enable this when the player is receiving a large number of seeks in a short period of time. For less frequent seeks, fine-tuning the [`SeekTolerance`](#seektolerance-1) may be sufficient.\n *\n * On Android, the player may consume more resources in this mode, so it should only be used for short periods of time in response to user interaction (for example, dragging on a progress bar UI element).\n *\n * On Android, when `scrubbingModeEnabled` is `true`, the playback is suppressed. You should set this property back to `false` when the user interaction ends to allow the playback to resume.\n * For best results, on iOS you should pause the playback when scrubbing.\n *\n * > For best scrubbing performance, consider also increasing the seeking tolerance using the [`SeekTolerance`](#seektolerance-1) property.\n *\n * > Other scrubbing mode options will have no effect when this is `false`.\n * @default false\n * @platform android\n * @platform ios\n */\n scrubbingModeEnabled?: boolean;\n\n /**\n * Whether the codec operating rate should be increased in scrubbing mode.\n *\n * @platform android\n * @default true\n */\n increaseCodecOperatingRate?: boolean;\n\n /**\n * Sets whether ExoPlayer's dynamic scheduling should be enabled in scrubbing mode.\n * This can result in available output buffers being handled more quickly when seeking.\n *\n * @platform android\n * @default true\n */\n enableDynamicScheduling?: boolean;\n /**\n * Sets whether to use `MediaCodec.BUFFER_FLAG_DECODE_ONLY` in scrubbing mode.\n * When playback is using MediaCodec on API 34+, this flag can speed up seeking by signalling that the decoded output of buffers between the previous keyframe and the target frame is not needed by the player.\n *\n * @platform android\n * @default true\n */\n useDecodeOnlyFlag?: boolean;\n\n /**\n * Sets whether to avoid flushing the decoder (where possible) in scrubbing mode.\n * When `true`, avoids flushing the decoder when a new seek starts decoding from a key-frame in compatible content.\n *\n * @platform android\n * @default true\n */\n allowSkippingMediaCodecFlush?: boolean;\n};\n"]}
@@ -8,7 +8,7 @@
8
8
  "publication": {
9
9
  "groupId": "host.exp.exponent",
10
10
  "artifactId": "expo.modules.video",
11
- "version": "3.1.0-canary-20251206-615dec1",
11
+ "version": "3.1.0-canary-20251211-7da85ea",
12
12
  "repository": "local-maven-repo"
13
13
  }
14
14
  }
@@ -37,7 +37,9 @@ internal struct VideoTrack: Record, Equatable {
37
37
  @Field var id: String? = nil
38
38
  @Field var size: VideoSize? = nil
39
39
  @Field var mimeType: String? = nil
40
- @Field var bitrate: Int? = nil
40
+ @Field var bitrate: Int? = nil // deprecated as of SDK 55
41
+ @Field var peakBitrate: Int? = nil
42
+ @Field var averageBitrate: Int? = nil
41
43
  @Field var isSupported: Bool = true
42
44
  @Field var frameRate: Float? = nil
43
45
 
@@ -49,20 +51,32 @@ internal struct VideoTrack: Record, Equatable {
49
51
  }
50
52
 
51
53
  static func from(assetTrack: AVAssetTrack) async -> VideoTrack {
52
- var bitrate: Int?
54
+ var averageBitrate: Int?
53
55
  var size: VideoSize?
54
56
  let supported = (try? await assetTrack.load(.isPlayable)) ?? true
55
57
  let mediaFormat = try? await assetTrack.mediaFormat
56
58
  let frameRate = try? await assetTrack.load(.nominalFrameRate)
57
59
 
58
60
  if let bitrateFloat = try? await assetTrack.load(.estimatedDataRate) {
59
- bitrate = Int(bitrateFloat)
61
+ averageBitrate = Int(bitrateFloat)
60
62
  }
63
+
64
+ let peakBitrate = await assetTrack.getPeakBitrate()
65
+
61
66
  if let cgSize = try? await assetTrack.load(.naturalSize) {
62
67
  size = VideoSize.from(cgSize)
63
68
  }
64
69
 
65
- return VideoTrack(id: "\(assetTrack.trackID)", size: size, mimeType: mediaFormat, bitrate: bitrate, isSupported: supported, frameRate: frameRate)
70
+ return VideoTrack(
71
+ id: "\(assetTrack.trackID)",
72
+ size: size,
73
+ mimeType: mediaFormat,
74
+ bitrate: peakBitrate ?? averageBitrate,
75
+ peakBitrate: peakBitrate,
76
+ averageBitrate: averageBitrate,
77
+ isSupported: supported,
78
+ frameRate: frameRate
79
+ )
66
80
  }
67
81
 
68
82
  static func from(hlsHeaderLine: String, idLine: String) -> VideoTrack? {
@@ -93,18 +107,32 @@ internal struct VideoTrack: Record, Equatable {
93
107
 
94
108
  let size = VideoSize(width: width, height: height)
95
109
  let mimeType = codecsToMimeType(codecs: details["CODECS"])
96
- var bitrate: Int? = nil
110
+ var peakBitrage: Int? = nil
111
+ var averageBitrate: Int? = nil
97
112
  var frameRate: Float? = nil
98
113
 
99
- // Use the default Andorid behavior for reporting the bitrate
100
- if let bitrateString = details["BANDWIDTH"] ?? details["AVERAGE-BANDWIDTH"] {
101
- bitrate = Int(bitrateString)
114
+ if let peakBitrateString = details["BANDWIDTH"] {
115
+ peakBitrage = Int(peakBitrateString)
116
+ }
117
+ if let averageBitrateString = details["AVERAGE-BANDWIDTH"] {
118
+ averageBitrate = Int(averageBitrateString)
102
119
  }
103
120
  if let frameRateString = details["FRAME-RATE"] {
104
121
  frameRate = Float(frameRateString)
105
122
  }
106
123
 
107
- return VideoTrack(id: idLine, size: size, mimeType: mimeType, bitrate: bitrate, frameRate: frameRate)
124
+ // Use the default Andorid behavior for reporting the bitrate
125
+ let bitrate = peakBitrage ?? averageBitrate
126
+
127
+ return VideoTrack(
128
+ id: idLine,
129
+ size: size,
130
+ mimeType: mimeType,
131
+ bitrate: bitrate,
132
+ peakBitrate: peakBitrage,
133
+ averageBitrate: averageBitrate,
134
+ frameRate: frameRate
135
+ )
108
136
  }
109
137
 
110
138
  // I'm not aware of any built in conversion functions. For HLS sources we only need to worry about a few formats though.
@@ -157,6 +185,40 @@ private extension AVAssetTrack {
157
185
  return format
158
186
  }
159
187
  }
188
+
189
+ // Decently reliable way to extract peak bitrate from MP4 containers
190
+ // Unlike for average bitrate, we can't get this information from AVKit API
191
+ func getPeakBitrate() async -> Int? {
192
+ guard let videoDescriptions = try? await self.load(.formatDescriptions),
193
+ let videoDescription = (videoDescriptions.first { $0.mediaType == .video }),
194
+ let extensions = videoDescription.getBitrateParentExtension(),
195
+ // If the container publishes the peak bitrate at all, it should be declared in this box
196
+ let btrtData = extensions["btrt"] as? Data, btrtData.count >= 12
197
+ else {
198
+ return nil
199
+ }
200
+
201
+ // https://mpeggroup.github.io/FileFormatConformance/?query=%3D%22btrt%22 (see under `Syntax`)
202
+ // Byte 0-3 (00060dd5): Buffer Size
203
+ // Byte 4-7 (0051fb78): Max Bitrate (Peak)
204
+ // Byte 8-11 (001e6270): Average Bitrate
205
+
206
+ // Extract bytes 4-7 (The MaxBitrate field)
207
+ let maxBitrateData = btrtData.subdata(in: 4..<8)
208
+
209
+ let maxBitrate = maxBitrateData.reduce(0) { result, byte in
210
+ return (result << 8) | UInt32(byte)
211
+ }
212
+
213
+ return Int(maxBitrate)
214
+ }
215
+ }
216
+
217
+ private extension CMFormatDescription {
218
+ func getBitrateParentExtension() -> [String: Any]? {
219
+ let extensionKey = kCMFormatDescriptionExtension_SampleDescriptionExtensionAtoms
220
+ return CMFormatDescriptionGetExtension(self, extensionKey: extensionKey) as? [String: Any]
221
+ }
160
222
  }
161
223
 
162
224
  private extension FourCharCode {
@@ -0,0 +1 @@
1
+ 1066a29f390153ec7ac2b58b86cc22ae3cd46fdd137e45fe27251c917e8558212eaedbd4ce4b2f23f610767451fd0c851c8864922dd8969013d1c868ca79efab
@@ -0,0 +1 @@
1
+ a3f51a150122d9343e91df81a91e739064f0912434d5b4cf8f0d77c9b66c1a09360ddc4a982e594cd523a758db6e7e060bbbbb0104eb8adba9529b8205bc4c17
@@ -3,7 +3,7 @@
3
3
  "component": {
4
4
  "group": "host.exp.exponent",
5
5
  "module": "expo.modules.video",
6
- "version": "3.1.0-canary-20251206-615dec1",
6
+ "version": "3.1.0-canary-20251211-7da85ea",
7
7
  "attributes": {
8
8
  "org.gradle.status": "release"
9
9
  }
@@ -24,13 +24,13 @@
24
24
  },
25
25
  "files": [
26
26
  {
27
- "name": "expo.modules.video-3.1.0-canary-20251206-615dec1.aar",
28
- "url": "expo.modules.video-3.1.0-canary-20251206-615dec1.aar",
29
- "size": 521693,
30
- "sha512": "80315321112a50ea9c2a0f648454c711e926979e13e840e3a4765b9bf11aab5b9a6e1e96e097035e2334dc07c74a170e0c22586abdbf16cde9a6a4203f4bb150",
31
- "sha256": "a798880284c657641111023631e5db21b69ec1f70b0c5ddef8f3fcdb4b74344a",
32
- "sha1": "9ceb3002e2080ee411d85d011c231f1441fc321f",
33
- "md5": "dd9850cad9600f2f781c3cd6412981c9"
27
+ "name": "expo.modules.video-3.1.0-canary-20251211-7da85ea.aar",
28
+ "url": "expo.modules.video-3.1.0-canary-20251211-7da85ea.aar",
29
+ "size": 520158,
30
+ "sha512": "a3f51a150122d9343e91df81a91e739064f0912434d5b4cf8f0d77c9b66c1a09360ddc4a982e594cd523a758db6e7e060bbbbb0104eb8adba9529b8205bc4c17",
31
+ "sha256": "1de895e582e3e8aab80712dd7f3f7ba892034035bef5504c049dfc6c02b269e6",
32
+ "sha1": "af4b59e5158d3c45a359992895bc21e0136ab9dd",
33
+ "md5": "4bf153a81df76a263ade99a8bf948d85"
34
34
  }
35
35
  ]
36
36
  },
@@ -113,13 +113,13 @@
113
113
  ],
114
114
  "files": [
115
115
  {
116
- "name": "expo.modules.video-3.1.0-canary-20251206-615dec1.aar",
117
- "url": "expo.modules.video-3.1.0-canary-20251206-615dec1.aar",
118
- "size": 521693,
119
- "sha512": "80315321112a50ea9c2a0f648454c711e926979e13e840e3a4765b9bf11aab5b9a6e1e96e097035e2334dc07c74a170e0c22586abdbf16cde9a6a4203f4bb150",
120
- "sha256": "a798880284c657641111023631e5db21b69ec1f70b0c5ddef8f3fcdb4b74344a",
121
- "sha1": "9ceb3002e2080ee411d85d011c231f1441fc321f",
122
- "md5": "dd9850cad9600f2f781c3cd6412981c9"
116
+ "name": "expo.modules.video-3.1.0-canary-20251211-7da85ea.aar",
117
+ "url": "expo.modules.video-3.1.0-canary-20251211-7da85ea.aar",
118
+ "size": 520158,
119
+ "sha512": "a3f51a150122d9343e91df81a91e739064f0912434d5b4cf8f0d77c9b66c1a09360ddc4a982e594cd523a758db6e7e060bbbbb0104eb8adba9529b8205bc4c17",
120
+ "sha256": "1de895e582e3e8aab80712dd7f3f7ba892034035bef5504c049dfc6c02b269e6",
121
+ "sha1": "af4b59e5158d3c45a359992895bc21e0136ab9dd",
122
+ "md5": "4bf153a81df76a263ade99a8bf948d85"
123
123
  }
124
124
  ]
125
125
  },
@@ -133,13 +133,13 @@
133
133
  },
134
134
  "files": [
135
135
  {
136
- "name": "expo.modules.video-3.1.0-canary-20251206-615dec1-sources.jar",
137
- "url": "expo.modules.video-3.1.0-canary-20251206-615dec1-sources.jar",
138
- "size": 65851,
139
- "sha512": "9d070597516eaab1ae9cf962df27014b29fbd6e8e5b1c193b862fd58fc57502d9b0f41c91cfa274053138c6692acd2c5a0e1ffeb916a38823e8593f19b9a38a3",
140
- "sha256": "a04a01c5d4d42ab97a5722dd881cc5aaed5027ffe038c8d4a1c9694be7d30d1b",
141
- "sha1": "77168884b234f8f361d4d82ff1588107366d0c30",
142
- "md5": "f15e6f6bb5dc5d17f83210bb5456cec1"
136
+ "name": "expo.modules.video-3.1.0-canary-20251211-7da85ea-sources.jar",
137
+ "url": "expo.modules.video-3.1.0-canary-20251211-7da85ea-sources.jar",
138
+ "size": 65921,
139
+ "sha512": "1066a29f390153ec7ac2b58b86cc22ae3cd46fdd137e45fe27251c917e8558212eaedbd4ce4b2f23f610767451fd0c851c8864922dd8969013d1c868ca79efab",
140
+ "sha256": "52042d5c4facc7a1d3ac9676c86c45edd1db8693adecf61303ec91845fc78e49",
141
+ "sha1": "080bb78f798d032ae5c9b14f65a3f292e7360c83",
142
+ "md5": "d32e63921a4014fa94ea5e3ba19e3506"
143
143
  }
144
144
  ]
145
145
  }
@@ -0,0 +1 @@
1
+ fa07020fc2b1b1d019d4a6271c0c174c02c966eb863ead6874a433e2f37ddde0a8b14b03aa8bb2b2669e9ce76a3525e2a1090c4ea53a1ea3c4444a4d97df50d4
@@ -9,7 +9,7 @@
9
9
  <modelVersion>4.0.0</modelVersion>
10
10
  <groupId>host.exp.exponent</groupId>
11
11
  <artifactId>expo.modules.video</artifactId>
12
- <version>3.1.0-canary-20251206-615dec1</version>
12
+ <version>3.1.0-canary-20251211-7da85ea</version>
13
13
  <packaging>aar</packaging>
14
14
  <name>expo.modules.video</name>
15
15
  <url>https://github.com/expo/expo</url>
@@ -0,0 +1 @@
1
+ 1cf9063de5f6d36928a32e84988a8befdf8347ec1306a21cb9edac7f4d96e3bfb0e443962a0699e0219a1b55526daf8c02f0b9b60f3ec6308c5d53a01a21f771
@@ -3,11 +3,11 @@
3
3
  <groupId>host.exp.exponent</groupId>
4
4
  <artifactId>expo.modules.video</artifactId>
5
5
  <versioning>
6
- <latest>3.1.0-canary-20251206-615dec1</latest>
7
- <release>3.1.0-canary-20251206-615dec1</release>
6
+ <latest>3.1.0-canary-20251211-7da85ea</latest>
7
+ <release>3.1.0-canary-20251211-7da85ea</release>
8
8
  <versions>
9
- <version>3.1.0-canary-20251206-615dec1</version>
9
+ <version>3.1.0-canary-20251211-7da85ea</version>
10
10
  </versions>
11
- <lastUpdated>20251206225002</lastUpdated>
11
+ <lastUpdated>20251211212240</lastUpdated>
12
12
  </versioning>
13
13
  </metadata>
@@ -1 +1 @@
1
- 2c52417a185c8a68b90bc0278aeeb255
1
+ 76a7249f0779dac5bffdbf2a57c833d0
@@ -1 +1 @@
1
- 4ecf3d0a00bf2f0dc843916417fa9df94a55bc1d
1
+ b5301354906696ecd21b34c0731874441aa000c0
@@ -1 +1 @@
1
- f1527596dc323a384e8aa48670a38c66cb0c82adea46234400871d25bb44402f
1
+ 1833780352b558e45bba0808e1d8a6d06abd944a3e03e07bbf5fd6a55fb1fd46
@@ -1 +1 @@
1
- f97932d3314cf05d4a9f7474c006c3f0c2398708111dd29ece155c74628030d0062748657db48d92ad416f214b8f26f4b7bc494a34d2aa07e337787a6341b886
1
+ 866954389f40614401d2a6789611baa9ceb2045839678f5e8ccc11f283d09d62ffc96dcdbea34f884c95d3c0c470d065884290688f4b0480bdf0fb1da4d105ab
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "expo-video",
3
3
  "title": "Expo Video",
4
- "version": "3.1.0-canary-20251206-615dec1",
4
+ "version": "3.1.0-canary-20251211-7da85ea",
5
5
  "description": "A cross-platform, performant video component for React Native and Expo with Web support",
6
6
  "main": "build/index.js",
7
7
  "types": "build/index.d.ts",
@@ -31,10 +31,10 @@
31
31
  "license": "MIT",
32
32
  "dependencies": {},
33
33
  "devDependencies": {
34
- "expo-module-scripts": "5.1.0-canary-20251206-615dec1"
34
+ "expo-module-scripts": "5.1.0-canary-20251211-7da85ea"
35
35
  },
36
36
  "peerDependencies": {
37
- "expo": "55.0.0-canary-20251206-615dec1",
37
+ "expo": "55.0.0-canary-20251211-7da85ea",
38
38
  "react": "*",
39
39
  "react-native": "*"
40
40
  }
@@ -338,66 +338,64 @@ export type VideoThumbnailOptions = {
338
338
  */
339
339
  export type VideoPlayerStatus = 'idle' | 'loading' | 'readyToPlay' | 'error';
340
340
 
341
- export type VideoSource =
342
- | string
343
- | number
344
- | null
345
- | {
346
- /**
347
- * The URI of the video.
348
- *
349
- * On iOS, `PHAsset` URIs are supported, but can only be loaded using the [`replaceAsync`](#replaceasyncsource) method or the default [`VideoPlayer`](#videoplayer) constructor.
350
- *
351
- * This property is exclusive with the `assetId` property. When both are present, the `assetId` will be ignored.
352
- */
353
- uri?: string;
354
-
355
- /**
356
- * The asset ID of a local video asset, acquired with the `require` function.
357
- * This property is exclusive with the `uri` property. When both are present, the `assetId` will be ignored.
358
- */
359
- assetId?: number;
360
-
361
- /**
362
- * Specifies the DRM options which will be used by the player while loading the video.
363
- */
364
- drm?: DRMOptions;
365
-
366
- /**
367
- * Specifies information which will be displayed in the now playing notification.
368
- * When undefined the player will display information contained in the video metadata.
369
- * @platform android
370
- * @platform ios
371
- */
372
- metadata?: VideoMetadata;
373
-
374
- /**
375
- * Specifies headers sent with the video request.
376
- * > For DRM license headers use the `headers` field of [`DRMOptions`](#drmoptions).
377
- * @platform android
378
- * @platform ios
379
- */
380
- headers?: Record<string, string>;
381
-
382
- /**
383
- * Specifies whether the player should use caching for the video.
384
- * > 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.
385
- * @default false
386
- * @platform android
387
- * @platform ios
388
- */
389
- useCaching?: boolean;
390
-
391
- /**
392
- * Specifies the content type of the video source. When set to `'auto'`, the player will try to automatically determine the content type.
393
- *
394
- * 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.
395
- * @default 'auto'
396
- * @platform android
397
- * @platform ios
398
- */
399
- contentType?: ContentType;
400
- };
341
+ export type VideoSource = string | number | null | VideoSourceObject;
342
+
343
+ export type VideoSourceObject = {
344
+ /**
345
+ * The URI of the video.
346
+ *
347
+ * On iOS, `PHAsset` URIs are supported, but can only be loaded using the [`replaceAsync`](#replaceasyncsource) method or the default [`VideoPlayer`](#videoplayer) constructor.
348
+ *
349
+ * This property is exclusive with the `assetId` property. When both are present, the `assetId` will be ignored.
350
+ */
351
+ uri?: string;
352
+
353
+ /**
354
+ * The asset ID of a local video asset, acquired with the `require` function.
355
+ * This property is exclusive with the `uri` property. When both are present, the `assetId` will be ignored.
356
+ */
357
+ assetId?: number;
358
+
359
+ /**
360
+ * Specifies the DRM options which will be used by the player while loading the video.
361
+ */
362
+ drm?: DRMOptions;
363
+
364
+ /**
365
+ * Specifies information which will be displayed in the now playing notification.
366
+ * When undefined the player will display information contained in the video metadata.
367
+ * @platform android
368
+ * @platform ios
369
+ */
370
+ metadata?: VideoMetadata;
371
+
372
+ /**
373
+ * Specifies headers sent with the video request.
374
+ * > For DRM license headers use the `headers` field of [`DRMOptions`](#drmoptions).
375
+ * @platform android
376
+ * @platform ios
377
+ */
378
+ headers?: Record<string, string>;
379
+
380
+ /**
381
+ * Specifies whether the player should use caching for the video.
382
+ * > 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.
383
+ * @default false
384
+ * @platform android
385
+ * @platform ios
386
+ */
387
+ useCaching?: boolean;
388
+
389
+ /**
390
+ * Specifies the content type of the video source. When set to `'auto'`, the player will try to automatically determine the content type.
391
+ *
392
+ * 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.
393
+ * @default 'auto'
394
+ * @platform android
395
+ * @platform ios
396
+ */
397
+ contentType?: ContentType;
398
+ };
401
399
 
402
400
  /**
403
401
  * Contains information about any errors that the player encountered during the playback
@@ -571,7 +569,7 @@ export type SubtitleTrack = {
571
569
  *
572
570
  * @platform android
573
571
  */
574
- id: string;
572
+ id?: string;
575
573
 
576
574
  /**
577
575
  * Language of the subtitle track. For example, `en`, `pl`, `de`.
@@ -614,9 +612,22 @@ export type VideoTrack = {
614
612
 
615
613
  /**
616
614
  * Specifies the bitrate in bits per second. This is the peak bitrate if known, or else the average bitrate if known, or else null.
615
+ *
616
+ * @deprecated Use `peakBitrate` or `averageBitrate` instead.
617
617
  */
618
618
  bitrate: number | null;
619
619
 
620
+ /**
621
+ * Specifies the average bitrate in bits per second or null if the value is unknown.
622
+ *
623
+ */
624
+ averageBitrate: number | null;
625
+
626
+ /**
627
+ * Specifies the average bitrate in bits per second or null if the value is unknown.
628
+ */
629
+ peakBitrate: number | null;
630
+
620
631
  /**
621
632
  * Specifies the frame rate of the video track in frames per second.
622
633
  */
@@ -642,7 +653,7 @@ export type AudioTrack = {
642
653
  * A string used by expo-video to identify the audio track.
643
654
  * @platform android
644
655
  */
645
- id: string;
656
+ id?: string;
646
657
 
647
658
  /**
648
659
  * Language of the audio track. For example, 'en', 'pl', 'de'.
@@ -1 +0,0 @@
1
- 9d070597516eaab1ae9cf962df27014b29fbd6e8e5b1c193b862fd58fc57502d9b0f41c91cfa274053138c6692acd2c5a0e1ffeb916a38823e8593f19b9a38a3
@@ -1 +0,0 @@
1
- 80315321112a50ea9c2a0f648454c711e926979e13e840e3a4765b9bf11aab5b9a6e1e96e097035e2334dc07c74a170e0c22586abdbf16cde9a6a4203f4bb150
@@ -1 +0,0 @@
1
- abdbc85be56aad09ea5ea0019e38e17a362705370d747b3f916e13df81c6b41f98ff0fffc8c0bd55c1367d4ed8562765b0faccd8c64f4bcb63359b2332a7498b
@@ -1 +0,0 @@
1
- 4f129f5747e44b25fe6f2b609342f984f8edd42fede4c5a44d5d861c652a52d6529113f2188fca86d4065f6297e20f2ff922421a8efbe7e5d184b5cf596916f4