expo-video 3.0.0-canary-20250729-d8899ae → 3.0.0-canary-20250811-5c940c0
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.
- package/CHANGELOG.md +3 -0
- package/android/build.gradle +2 -2
- package/android/src/main/java/expo/modules/video/FullscreenPlayerActivity.kt +30 -0
- package/android/src/main/java/expo/modules/video/VideoView.kt +51 -0
- package/android/src/main/java/expo/modules/video/utils/SubtitleUtils.kt +57 -0
- package/expo-module.config.json +1 -1
- package/ios/VideoModule.swift +1 -0
- package/local-maven-repo/host/exp/exponent/expo.modules.video/{3.0.0-canary-20250729-d8899ae/expo.modules.video-3.0.0-canary-20250729-d8899ae-sources.jar → 3.0.0-canary-20250811-5c940c0/expo.modules.video-3.0.0-canary-20250811-5c940c0-sources.jar} +0 -0
- package/local-maven-repo/host/exp/exponent/expo.modules.video/3.0.0-canary-20250811-5c940c0/expo.modules.video-3.0.0-canary-20250811-5c940c0-sources.jar.md5 +1 -0
- package/local-maven-repo/host/exp/exponent/expo.modules.video/3.0.0-canary-20250811-5c940c0/expo.modules.video-3.0.0-canary-20250811-5c940c0-sources.jar.sha1 +1 -0
- package/local-maven-repo/host/exp/exponent/expo.modules.video/3.0.0-canary-20250811-5c940c0/expo.modules.video-3.0.0-canary-20250811-5c940c0-sources.jar.sha256 +1 -0
- package/local-maven-repo/host/exp/exponent/expo.modules.video/3.0.0-canary-20250811-5c940c0/expo.modules.video-3.0.0-canary-20250811-5c940c0-sources.jar.sha512 +1 -0
- package/local-maven-repo/host/exp/exponent/expo.modules.video/3.0.0-canary-20250811-5c940c0/expo.modules.video-3.0.0-canary-20250811-5c940c0.aar +0 -0
- package/local-maven-repo/host/exp/exponent/expo.modules.video/3.0.0-canary-20250811-5c940c0/expo.modules.video-3.0.0-canary-20250811-5c940c0.aar.md5 +1 -0
- package/local-maven-repo/host/exp/exponent/expo.modules.video/3.0.0-canary-20250811-5c940c0/expo.modules.video-3.0.0-canary-20250811-5c940c0.aar.sha1 +1 -0
- package/local-maven-repo/host/exp/exponent/expo.modules.video/3.0.0-canary-20250811-5c940c0/expo.modules.video-3.0.0-canary-20250811-5c940c0.aar.sha256 +1 -0
- package/local-maven-repo/host/exp/exponent/expo.modules.video/3.0.0-canary-20250811-5c940c0/expo.modules.video-3.0.0-canary-20250811-5c940c0.aar.sha512 +1 -0
- package/local-maven-repo/host/exp/exponent/expo.modules.video/{3.0.0-canary-20250729-d8899ae/expo.modules.video-3.0.0-canary-20250729-d8899ae.module → 3.0.0-canary-20250811-5c940c0/expo.modules.video-3.0.0-canary-20250811-5c940c0.module} +22 -22
- package/local-maven-repo/host/exp/exponent/expo.modules.video/3.0.0-canary-20250811-5c940c0/expo.modules.video-3.0.0-canary-20250811-5c940c0.module.md5 +1 -0
- package/local-maven-repo/host/exp/exponent/expo.modules.video/3.0.0-canary-20250811-5c940c0/expo.modules.video-3.0.0-canary-20250811-5c940c0.module.sha1 +1 -0
- package/local-maven-repo/host/exp/exponent/expo.modules.video/3.0.0-canary-20250811-5c940c0/expo.modules.video-3.0.0-canary-20250811-5c940c0.module.sha256 +1 -0
- package/local-maven-repo/host/exp/exponent/expo.modules.video/3.0.0-canary-20250811-5c940c0/expo.modules.video-3.0.0-canary-20250811-5c940c0.module.sha512 +1 -0
- package/local-maven-repo/host/exp/exponent/expo.modules.video/{3.0.0-canary-20250729-d8899ae/expo.modules.video-3.0.0-canary-20250729-d8899ae.pom → 3.0.0-canary-20250811-5c940c0/expo.modules.video-3.0.0-canary-20250811-5c940c0.pom} +1 -1
- package/local-maven-repo/host/exp/exponent/expo.modules.video/3.0.0-canary-20250811-5c940c0/expo.modules.video-3.0.0-canary-20250811-5c940c0.pom.md5 +1 -0
- package/local-maven-repo/host/exp/exponent/expo.modules.video/3.0.0-canary-20250811-5c940c0/expo.modules.video-3.0.0-canary-20250811-5c940c0.pom.sha1 +1 -0
- package/local-maven-repo/host/exp/exponent/expo.modules.video/3.0.0-canary-20250811-5c940c0/expo.modules.video-3.0.0-canary-20250811-5c940c0.pom.sha256 +1 -0
- package/local-maven-repo/host/exp/exponent/expo.modules.video/3.0.0-canary-20250811-5c940c0/expo.modules.video-3.0.0-canary-20250811-5c940c0.pom.sha512 +1 -0
- package/local-maven-repo/host/exp/exponent/expo.modules.video/maven-metadata.xml +4 -4
- package/local-maven-repo/host/exp/exponent/expo.modules.video/maven-metadata.xml.md5 +1 -1
- package/local-maven-repo/host/exp/exponent/expo.modules.video/maven-metadata.xml.sha1 +1 -1
- package/local-maven-repo/host/exp/exponent/expo.modules.video/maven-metadata.xml.sha256 +1 -1
- package/local-maven-repo/host/exp/exponent/expo.modules.video/maven-metadata.xml.sha512 +1 -1
- package/package.json +3 -3
- package/local-maven-repo/host/exp/exponent/expo.modules.video/3.0.0-canary-20250729-d8899ae/expo.modules.video-3.0.0-canary-20250729-d8899ae-sources.jar.md5 +0 -1
- package/local-maven-repo/host/exp/exponent/expo.modules.video/3.0.0-canary-20250729-d8899ae/expo.modules.video-3.0.0-canary-20250729-d8899ae-sources.jar.sha1 +0 -1
- package/local-maven-repo/host/exp/exponent/expo.modules.video/3.0.0-canary-20250729-d8899ae/expo.modules.video-3.0.0-canary-20250729-d8899ae-sources.jar.sha256 +0 -1
- package/local-maven-repo/host/exp/exponent/expo.modules.video/3.0.0-canary-20250729-d8899ae/expo.modules.video-3.0.0-canary-20250729-d8899ae-sources.jar.sha512 +0 -1
- package/local-maven-repo/host/exp/exponent/expo.modules.video/3.0.0-canary-20250729-d8899ae/expo.modules.video-3.0.0-canary-20250729-d8899ae.aar +0 -0
- package/local-maven-repo/host/exp/exponent/expo.modules.video/3.0.0-canary-20250729-d8899ae/expo.modules.video-3.0.0-canary-20250729-d8899ae.aar.md5 +0 -1
- package/local-maven-repo/host/exp/exponent/expo.modules.video/3.0.0-canary-20250729-d8899ae/expo.modules.video-3.0.0-canary-20250729-d8899ae.aar.sha1 +0 -1
- package/local-maven-repo/host/exp/exponent/expo.modules.video/3.0.0-canary-20250729-d8899ae/expo.modules.video-3.0.0-canary-20250729-d8899ae.aar.sha256 +0 -1
- package/local-maven-repo/host/exp/exponent/expo.modules.video/3.0.0-canary-20250729-d8899ae/expo.modules.video-3.0.0-canary-20250729-d8899ae.aar.sha512 +0 -1
- package/local-maven-repo/host/exp/exponent/expo.modules.video/3.0.0-canary-20250729-d8899ae/expo.modules.video-3.0.0-canary-20250729-d8899ae.module.md5 +0 -1
- package/local-maven-repo/host/exp/exponent/expo.modules.video/3.0.0-canary-20250729-d8899ae/expo.modules.video-3.0.0-canary-20250729-d8899ae.module.sha1 +0 -1
- package/local-maven-repo/host/exp/exponent/expo.modules.video/3.0.0-canary-20250729-d8899ae/expo.modules.video-3.0.0-canary-20250729-d8899ae.module.sha256 +0 -1
- package/local-maven-repo/host/exp/exponent/expo.modules.video/3.0.0-canary-20250729-d8899ae/expo.modules.video-3.0.0-canary-20250729-d8899ae.module.sha512 +0 -1
- package/local-maven-repo/host/exp/exponent/expo.modules.video/3.0.0-canary-20250729-d8899ae/expo.modules.video-3.0.0-canary-20250729-d8899ae.pom.md5 +0 -1
- package/local-maven-repo/host/exp/exponent/expo.modules.video/3.0.0-canary-20250729-d8899ae/expo.modules.video-3.0.0-canary-20250729-d8899ae.pom.sha1 +0 -1
- package/local-maven-repo/host/exp/exponent/expo.modules.video/3.0.0-canary-20250729-d8899ae/expo.modules.video-3.0.0-canary-20250729-d8899ae.pom.sha256 +0 -1
- package/local-maven-repo/host/exp/exponent/expo.modules.video/3.0.0-canary-20250729-d8899ae/expo.modules.video-3.0.0-canary-20250729-d8899ae.pom.sha512 +0 -1
package/CHANGELOG.md
CHANGED
|
@@ -10,6 +10,7 @@
|
|
|
10
10
|
|
|
11
11
|
- [iOS] Add complete support for AirPlay streaming. Add a device selection button and `VideoPlayer.isExternalPlaybackActive` property and appropriate listeners. ([#37207](https://github.com/expo/expo/pull/37207) by [@behenate](https://github.com/behenate))
|
|
12
12
|
- Add fullscreen orientation and auto-exit functionality. ([#36910](https://github.com/expo/expo/pull/36910) by [@behenate](https://github.com/behenate))
|
|
13
|
+
- [Android] React to system wide subtitle changes in real time, does not require an app reload ([#38591](https://github.com/expo/expo/pull/38591) by [@hirbod](https://github.com/hirbod))
|
|
13
14
|
|
|
14
15
|
### 🐛 Bug fixes
|
|
15
16
|
|
|
@@ -17,6 +18,8 @@
|
|
|
17
18
|
- [Android] Fix accessing player.loop causes app to crash. ([#37928](https://github.com/expo/expo/pull/37928) by [@Wenszel](https://github.com/Wenszel))
|
|
18
19
|
- [iOS] Setting `player.currentTime` doesn't seek to the correct time on some videos. ([#37672](https://github.com/expo/expo/pull/37300) by [@petrkonecny2](https://github.com/petrkonecny2))
|
|
19
20
|
- [iOS] Fix tvOS compilation errors. ([#38085](https://github.com/expo/expo/pull/38085) by [@douglowder](https://github.com/douglowder))
|
|
21
|
+
- [Android] Fix: Respect accessibility settings for HLS subtitle sizing and system settings, added listener ([#38591](https://github.com/expo/expo/pull/38591) by [@hirbod](https://github.com/hirbod))
|
|
22
|
+
- [iOS] Fix inconsistent behavior of "replay" on iOS by calling "play()" after seeking to position 0. ([#38590](https://github.com/expo/expo/pull/38590)) by [@saviocmc](https://github.com/saviocmc)
|
|
20
23
|
|
|
21
24
|
### 💡 Others
|
|
22
25
|
|
package/android/build.gradle
CHANGED
|
@@ -4,13 +4,13 @@ plugins {
|
|
|
4
4
|
}
|
|
5
5
|
|
|
6
6
|
group = 'host.exp.exponent'
|
|
7
|
-
version = '3.0.0-canary-
|
|
7
|
+
version = '3.0.0-canary-20250811-5c940c0'
|
|
8
8
|
|
|
9
9
|
android {
|
|
10
10
|
namespace "expo.modules.video"
|
|
11
11
|
defaultConfig {
|
|
12
12
|
versionCode 1
|
|
13
|
-
versionName '3.0.0-canary-
|
|
13
|
+
versionName '3.0.0-canary-20250811-5c940c0'
|
|
14
14
|
}
|
|
15
15
|
}
|
|
16
16
|
|
|
@@ -5,8 +5,10 @@ import android.content.pm.ActivityInfo
|
|
|
5
5
|
import android.content.res.Configuration
|
|
6
6
|
import android.os.Build
|
|
7
7
|
import android.os.Bundle
|
|
8
|
+
import android.content.Context
|
|
8
9
|
import android.util.Log
|
|
9
10
|
import android.view.View
|
|
11
|
+
import android.view.accessibility.CaptioningManager
|
|
10
12
|
import android.view.WindowInsets
|
|
11
13
|
import android.view.WindowInsetsController
|
|
12
14
|
import android.widget.ImageButton
|
|
@@ -15,6 +17,7 @@ import expo.modules.kotlin.exception.CodedException
|
|
|
15
17
|
import expo.modules.video.player.VideoPlayer
|
|
16
18
|
import expo.modules.video.records.FullscreenOptions
|
|
17
19
|
import expo.modules.video.utils.FullscreenActivityOrientationHelper
|
|
20
|
+
import expo.modules.video.utils.SubtitleUtils
|
|
18
21
|
import expo.modules.video.utils.applyPiPParams
|
|
19
22
|
import expo.modules.video.utils.applyRectHint
|
|
20
23
|
import expo.modules.video.utils.calculatePiPAspectRatio
|
|
@@ -31,6 +34,7 @@ class FullscreenPlayerActivity : Activity() {
|
|
|
31
34
|
private var wasAutoPaused = false
|
|
32
35
|
private lateinit var options: FullscreenOptions
|
|
33
36
|
private lateinit var orientationHelper: FullscreenActivityOrientationHelper
|
|
37
|
+
private var captioningChangeListener: CaptioningManager.CaptioningChangeListener? = null
|
|
34
38
|
|
|
35
39
|
override fun onCreate(savedInstanceState: Bundle?) {
|
|
36
40
|
super.onCreate(savedInstanceState)
|
|
@@ -93,6 +97,12 @@ class FullscreenPlayerActivity : Activity() {
|
|
|
93
97
|
}
|
|
94
98
|
playerView.setShowSubtitleButton(videoView.showsSubtitlesButton)
|
|
95
99
|
|
|
100
|
+
// Configure subtitle view to fix sizing issues with embedded styles (same as VideoView)
|
|
101
|
+
SubtitleUtils.configureSubtitleView(playerView, this)
|
|
102
|
+
|
|
103
|
+
// Set up listener for accessibility caption changes
|
|
104
|
+
setupCaptioningChangeListener()
|
|
105
|
+
|
|
96
106
|
playerView.addOnLayoutChangeListener { _, _, _, _, _, _, _, _, _ ->
|
|
97
107
|
applyRectHint(this, calculateRectHint(playerView))
|
|
98
108
|
}
|
|
@@ -115,6 +125,8 @@ class FullscreenPlayerActivity : Activity() {
|
|
|
115
125
|
override fun onResume() {
|
|
116
126
|
orientationHelper.startOrientationEventListener()
|
|
117
127
|
playerView.useController = videoView.useNativeControls
|
|
128
|
+
// Reconfigure subtitles when resuming (handles returning from settings)
|
|
129
|
+
SubtitleUtils.configureSubtitleView(playerView, this)
|
|
118
130
|
super.onResume()
|
|
119
131
|
}
|
|
120
132
|
|
|
@@ -132,6 +144,14 @@ class FullscreenPlayerActivity : Activity() {
|
|
|
132
144
|
|
|
133
145
|
override fun onDestroy() {
|
|
134
146
|
super.onDestroy()
|
|
147
|
+
|
|
148
|
+
// Clean up captioning change listener
|
|
149
|
+
captioningChangeListener?.let {
|
|
150
|
+
val captioningManager = getSystemService(Context.CAPTIONING_SERVICE) as? CaptioningManager
|
|
151
|
+
captioningManager?.removeCaptioningChangeListener(it)
|
|
152
|
+
captioningChangeListener = null
|
|
153
|
+
}
|
|
154
|
+
|
|
135
155
|
videoView.exitFullscreen()
|
|
136
156
|
VideoManager.unregisterFullscreenPlayerActivity(hashCode().toString())
|
|
137
157
|
orientationHelper.stopOrientationEventListener()
|
|
@@ -176,6 +196,16 @@ class FullscreenPlayerActivity : Activity() {
|
|
|
176
196
|
}
|
|
177
197
|
}
|
|
178
198
|
|
|
199
|
+
private fun setupCaptioningChangeListener() {
|
|
200
|
+
val captioningManager = getSystemService(Context.CAPTIONING_SERVICE) as? CaptioningManager
|
|
201
|
+
|
|
202
|
+
captioningChangeListener = SubtitleUtils.createCaptioningChangeListener(playerView, this)
|
|
203
|
+
|
|
204
|
+
captioningChangeListener?.let { listener ->
|
|
205
|
+
captioningManager?.addCaptioningChangeListener(listener)
|
|
206
|
+
}
|
|
207
|
+
}
|
|
208
|
+
|
|
179
209
|
override fun onConfigurationChanged(newConfig: Configuration) {
|
|
180
210
|
super.onConfigurationChanged(newConfig)
|
|
181
211
|
orientationHelper.onConfigurationChanged(newConfig)
|
|
@@ -7,6 +7,7 @@ import android.content.Intent
|
|
|
7
7
|
import android.graphics.Color
|
|
8
8
|
import android.os.Build
|
|
9
9
|
import android.util.Rational
|
|
10
|
+
import android.view.accessibility.CaptioningManager
|
|
10
11
|
import android.view.LayoutInflater
|
|
11
12
|
import android.view.MotionEvent
|
|
12
13
|
import android.view.View
|
|
@@ -34,6 +35,7 @@ import expo.modules.video.records.VideoSource
|
|
|
34
35
|
import expo.modules.video.records.VideoTrack
|
|
35
36
|
import expo.modules.video.utils.applyPiPParams
|
|
36
37
|
import expo.modules.video.records.FullscreenOptions
|
|
38
|
+
import expo.modules.video.utils.SubtitleUtils
|
|
37
39
|
import expo.modules.video.utils.applyRectHint
|
|
38
40
|
import expo.modules.video.utils.calculatePiPAspectRatio
|
|
39
41
|
import expo.modules.video.utils.calculateRectHint
|
|
@@ -73,6 +75,14 @@ open class VideoView(context: Context, appContext: AppContext, useTextureView: B
|
|
|
73
75
|
private val rootViewChildrenOriginalVisibility: ArrayList<Int> = arrayListOf()
|
|
74
76
|
private var pictureInPictureHelperTag: String? = null
|
|
75
77
|
private var reactNativeEventDispatcher: EventDispatcher? = null
|
|
78
|
+
private var captioningChangeListener: CaptioningManager.CaptioningChangeListener? = null
|
|
79
|
+
|
|
80
|
+
private val windowFocusChangeListener = View.OnFocusChangeListener { _, hasFocus ->
|
|
81
|
+
if (hasFocus) {
|
|
82
|
+
// Reconfigure when window gains focus (returning from settings)
|
|
83
|
+
SubtitleUtils.configureSubtitleView(playerView, context)
|
|
84
|
+
}
|
|
85
|
+
}
|
|
76
86
|
|
|
77
87
|
// We need to keep track of the target surface view visibility, but only apply it when `useExoShutter` is false.
|
|
78
88
|
var shouldHideSurfaceView: Boolean = true
|
|
@@ -162,6 +172,9 @@ open class VideoView(context: Context, appContext: AppContext, useTextureView: B
|
|
|
162
172
|
// Start with the SurfaceView being transparent to avoid any flickers when the prop value is delivered.
|
|
163
173
|
this.playerView.setShutterBackgroundColor(Color.TRANSPARENT)
|
|
164
174
|
this.playerView.videoSurfaceView?.alpha = 0f
|
|
175
|
+
|
|
176
|
+
// Configure subtitle view to fix sizing issues with embedded styles
|
|
177
|
+
SubtitleUtils.configureSubtitleView(playerView, context)
|
|
165
178
|
addView(
|
|
166
179
|
playerView,
|
|
167
180
|
ViewGroup.LayoutParams(
|
|
@@ -319,9 +332,26 @@ open class VideoView(context: Context, appContext: AppContext, useTextureView: B
|
|
|
319
332
|
.add(fragment, fragment.id)
|
|
320
333
|
.commitAllowingStateLoss()
|
|
321
334
|
}
|
|
335
|
+
|
|
336
|
+
// Set up listener for accessibility caption changes when attached to window
|
|
337
|
+
setupCaptioningChangeListener()
|
|
338
|
+
// Reconfigure when view is attached (handles returning from settings)
|
|
339
|
+
SubtitleUtils.configureSubtitleView(playerView, context)
|
|
340
|
+
|
|
341
|
+
// Set up window focus change listener
|
|
342
|
+
decorView.onFocusChangeListener = windowFocusChangeListener
|
|
343
|
+
|
|
322
344
|
applyPiPParams(currentActivity, autoEnterPiP)
|
|
323
345
|
}
|
|
324
346
|
|
|
347
|
+
override fun onVisibilityChanged(changedView: View, visibility: Int) {
|
|
348
|
+
super.onVisibilityChanged(changedView, visibility)
|
|
349
|
+
if (visibility == View.VISIBLE) {
|
|
350
|
+
// Reconfigure subtitles when view becomes visible (immediate response)
|
|
351
|
+
SubtitleUtils.configureSubtitleView(playerView, context)
|
|
352
|
+
}
|
|
353
|
+
}
|
|
354
|
+
|
|
325
355
|
override fun onDetachedFromWindow() {
|
|
326
356
|
super.onDetachedFromWindow()
|
|
327
357
|
(currentActivity as? FragmentActivity)?.let {
|
|
@@ -331,6 +361,17 @@ open class VideoView(context: Context, appContext: AppContext, useTextureView: B
|
|
|
331
361
|
.remove(fragment)
|
|
332
362
|
.commitAllowingStateLoss()
|
|
333
363
|
}
|
|
364
|
+
|
|
365
|
+
// Clean up captioning change listener
|
|
366
|
+
captioningChangeListener?.let {
|
|
367
|
+
val captioningManager = context.getSystemService(Context.CAPTIONING_SERVICE) as? CaptioningManager
|
|
368
|
+
captioningManager?.removeCaptioningChangeListener(it)
|
|
369
|
+
captioningChangeListener = null
|
|
370
|
+
}
|
|
371
|
+
|
|
372
|
+
// Clean up window focus listener
|
|
373
|
+
decorView.onFocusChangeListener = null
|
|
374
|
+
|
|
334
375
|
applyPiPParams(currentActivity, false)
|
|
335
376
|
}
|
|
336
377
|
|
|
@@ -370,6 +411,16 @@ open class VideoView(context: Context, appContext: AppContext, useTextureView: B
|
|
|
370
411
|
}
|
|
371
412
|
}
|
|
372
413
|
|
|
414
|
+
private fun setupCaptioningChangeListener() {
|
|
415
|
+
val captioningManager = context.getSystemService(Context.CAPTIONING_SERVICE) as? CaptioningManager
|
|
416
|
+
|
|
417
|
+
captioningChangeListener = SubtitleUtils.createCaptioningChangeListener(playerView, context)
|
|
418
|
+
|
|
419
|
+
captioningChangeListener?.let { listener ->
|
|
420
|
+
captioningManager?.addCaptioningChangeListener(listener)
|
|
421
|
+
}
|
|
422
|
+
}
|
|
423
|
+
|
|
373
424
|
companion object {
|
|
374
425
|
fun isPictureInPictureSupported(currentActivity: Activity): Boolean {
|
|
375
426
|
return Build.VERSION.SDK_INT >= Build.VERSION_CODES.O && currentActivity.packageManager.hasSystemFeature(
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
package expo.modules.video.utils
|
|
2
|
+
|
|
3
|
+
import android.content.Context
|
|
4
|
+
import android.util.TypedValue
|
|
5
|
+
import android.view.accessibility.CaptioningManager
|
|
6
|
+
import androidx.media3.ui.CaptionStyleCompat
|
|
7
|
+
import androidx.media3.ui.PlayerView
|
|
8
|
+
|
|
9
|
+
object SubtitleUtils {
|
|
10
|
+
/**
|
|
11
|
+
* Configures the PlayerView's subtitle view to fix sizing issues with embedded styles.
|
|
12
|
+
* Disables embedded HLS subtitle styling and applies Android accessibility settings
|
|
13
|
+
* with a reasonable base font size.
|
|
14
|
+
*/
|
|
15
|
+
fun configureSubtitleView(playerView: PlayerView, context: Context) {
|
|
16
|
+
playerView.subtitleView?.apply {
|
|
17
|
+
setApplyEmbeddedStyles(false)
|
|
18
|
+
setApplyEmbeddedFontSizes(false)
|
|
19
|
+
|
|
20
|
+
// Apply system accessibility caption style but with reasonable base font size
|
|
21
|
+
val captioningManager = context.getSystemService(Context.CAPTIONING_SERVICE) as? CaptioningManager
|
|
22
|
+
val userStyle = captioningManager?.userStyle
|
|
23
|
+
|
|
24
|
+
if (userStyle != null) {
|
|
25
|
+
val systemStyle = CaptionStyleCompat.createFromCaptionStyle(userStyle)
|
|
26
|
+
setStyle(systemStyle)
|
|
27
|
+
|
|
28
|
+
val fontScale = captioningManager.fontScale
|
|
29
|
+
val baseFontSize = 16f // Reasonable base size
|
|
30
|
+
setFixedTextSize(TypedValue.COMPLEX_UNIT_SP, baseFontSize * fontScale)
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
/**
|
|
36
|
+
* Creates a CaptioningChangeListener that reconfigures subtitles when accessibility
|
|
37
|
+
* settings change.
|
|
38
|
+
*/
|
|
39
|
+
fun createCaptioningChangeListener(
|
|
40
|
+
playerView: PlayerView,
|
|
41
|
+
context: Context
|
|
42
|
+
): CaptioningManager.CaptioningChangeListener {
|
|
43
|
+
return object : CaptioningManager.CaptioningChangeListener() {
|
|
44
|
+
override fun onEnabledChanged(enabled: Boolean) {
|
|
45
|
+
configureSubtitleView(playerView, context)
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
override fun onUserStyleChanged(userStyle: android.view.accessibility.CaptioningManager.CaptionStyle) {
|
|
49
|
+
configureSubtitleView(playerView, context)
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
override fun onFontScaleChanged(fontScale: Float) {
|
|
53
|
+
configureSubtitleView(playerView, context)
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
}
|
package/expo-module.config.json
CHANGED
package/ios/VideoModule.swift
CHANGED
|
@@ -339,6 +339,7 @@ public final class VideoModule: Module {
|
|
|
339
339
|
|
|
340
340
|
Function("replay") { player in
|
|
341
341
|
player.ref.seek(to: CMTime.zero)
|
|
342
|
+
player.ref.play()
|
|
342
343
|
}
|
|
343
344
|
|
|
344
345
|
AsyncFunction("generateThumbnailsAsync") { (player: VideoPlayer, times: [CMTime]?, options: VideoThumbnailOptions?) -> [VideoThumbnail] in
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
08f3652ee7565d5a1179da304b324ad9
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
70dc3863ba236f8e99d01702acf79b27e553b89d
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
bceacd039dc8527a9012b8e651199decbf343cfbd3b6a8cb976f5f20bfdcec35
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
271eee95c9680d81b7502617652075d4e1a95d1aeb76700dcfeac060913351765dedf97466588d4d6c8a01488d51249bf10325f99e1d2ba2f500f2121f1446e1
|
|
Binary file
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
d9b74eafb2f6080cbf12445a872c47e8
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
7a4337bf8aadde6d25a7999b421ea85f4b4cf751
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
ae5e41be0c79fad5f2abfc91e5c65102d7a501074b4d2a0e768a26927a2a0004
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
469758e3cc6a4df377df5313647f7bb5d1e2829288be57619ffebcaa73000f56e7b4db7446ce8fc22e71270cc4630247016221ccd180b231689b90c3e1447f0e
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
"component": {
|
|
4
4
|
"group": "host.exp.exponent",
|
|
5
5
|
"module": "expo.modules.video",
|
|
6
|
-
"version": "3.0.0-canary-
|
|
6
|
+
"version": "3.0.0-canary-20250811-5c940c0",
|
|
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.0.0-canary-
|
|
28
|
-
"url": "expo.modules.video-3.0.0-canary-
|
|
29
|
-
"size":
|
|
30
|
-
"sha512": "
|
|
31
|
-
"sha256": "
|
|
32
|
-
"sha1": "
|
|
33
|
-
"md5": "
|
|
27
|
+
"name": "expo.modules.video-3.0.0-canary-20250811-5c940c0.aar",
|
|
28
|
+
"url": "expo.modules.video-3.0.0-canary-20250811-5c940c0.aar",
|
|
29
|
+
"size": 470597,
|
|
30
|
+
"sha512": "469758e3cc6a4df377df5313647f7bb5d1e2829288be57619ffebcaa73000f56e7b4db7446ce8fc22e71270cc4630247016221ccd180b231689b90c3e1447f0e",
|
|
31
|
+
"sha256": "ae5e41be0c79fad5f2abfc91e5c65102d7a501074b4d2a0e768a26927a2a0004",
|
|
32
|
+
"sha1": "7a4337bf8aadde6d25a7999b421ea85f4b4cf751",
|
|
33
|
+
"md5": "d9b74eafb2f6080cbf12445a872c47e8"
|
|
34
34
|
}
|
|
35
35
|
]
|
|
36
36
|
},
|
|
@@ -113,13 +113,13 @@
|
|
|
113
113
|
],
|
|
114
114
|
"files": [
|
|
115
115
|
{
|
|
116
|
-
"name": "expo.modules.video-3.0.0-canary-
|
|
117
|
-
"url": "expo.modules.video-3.0.0-canary-
|
|
118
|
-
"size":
|
|
119
|
-
"sha512": "
|
|
120
|
-
"sha256": "
|
|
121
|
-
"sha1": "
|
|
122
|
-
"md5": "
|
|
116
|
+
"name": "expo.modules.video-3.0.0-canary-20250811-5c940c0.aar",
|
|
117
|
+
"url": "expo.modules.video-3.0.0-canary-20250811-5c940c0.aar",
|
|
118
|
+
"size": 470597,
|
|
119
|
+
"sha512": "469758e3cc6a4df377df5313647f7bb5d1e2829288be57619ffebcaa73000f56e7b4db7446ce8fc22e71270cc4630247016221ccd180b231689b90c3e1447f0e",
|
|
120
|
+
"sha256": "ae5e41be0c79fad5f2abfc91e5c65102d7a501074b4d2a0e768a26927a2a0004",
|
|
121
|
+
"sha1": "7a4337bf8aadde6d25a7999b421ea85f4b4cf751",
|
|
122
|
+
"md5": "d9b74eafb2f6080cbf12445a872c47e8"
|
|
123
123
|
}
|
|
124
124
|
]
|
|
125
125
|
},
|
|
@@ -133,13 +133,13 @@
|
|
|
133
133
|
},
|
|
134
134
|
"files": [
|
|
135
135
|
{
|
|
136
|
-
"name": "expo.modules.video-3.0.0-canary-
|
|
137
|
-
"url": "expo.modules.video-3.0.0-canary-
|
|
138
|
-
"size":
|
|
139
|
-
"sha512": "
|
|
140
|
-
"sha256": "
|
|
141
|
-
"sha1": "
|
|
142
|
-
"md5": "
|
|
136
|
+
"name": "expo.modules.video-3.0.0-canary-20250811-5c940c0-sources.jar",
|
|
137
|
+
"url": "expo.modules.video-3.0.0-canary-20250811-5c940c0-sources.jar",
|
|
138
|
+
"size": 57958,
|
|
139
|
+
"sha512": "271eee95c9680d81b7502617652075d4e1a95d1aeb76700dcfeac060913351765dedf97466588d4d6c8a01488d51249bf10325f99e1d2ba2f500f2121f1446e1",
|
|
140
|
+
"sha256": "bceacd039dc8527a9012b8e651199decbf343cfbd3b6a8cb976f5f20bfdcec35",
|
|
141
|
+
"sha1": "70dc3863ba236f8e99d01702acf79b27e553b89d",
|
|
142
|
+
"md5": "08f3652ee7565d5a1179da304b324ad9"
|
|
143
143
|
}
|
|
144
144
|
]
|
|
145
145
|
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
fac410437e84f8c30daded95dd206599
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
33f1ee204e4aa9b3c9835884d7eded516bb83f3c
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
3918b09ba2fdab3669a23ea8ba1900d8d708edbd8ae4a7cd90b0c63481e9554e
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
3ec90666c96f49ab6df65dcb1a0a53ed100ecdc547a6f7f8c5c5873558f1bdb584ff9f0f2ddfee15d0518e7c4845f8aa5c1734c9c816bef414390928507c8188
|
|
@@ -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.0.0-canary-
|
|
12
|
+
<version>3.0.0-canary-20250811-5c940c0</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
|
+
36522bd34e1d0404c94f94c46c5cb9cf
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
e253992d8ca1aa30d7e98af00d2ebd1a5c174553
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
d6cc6bf69a97f58c5c776b7fd3d2018f1739569a3b483b39f9e79264c7973108
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
8f5d679aec2e0da530f320ce677ebebbc2d52bdf3ba22614c8239f7ac4b012e56bdddb0a1406a1e4c05a308a1891a3892e9c5129dc37f83bdaa1ccee4aa8e7bd
|
|
@@ -3,11 +3,11 @@
|
|
|
3
3
|
<groupId>host.exp.exponent</groupId>
|
|
4
4
|
<artifactId>expo.modules.video</artifactId>
|
|
5
5
|
<versioning>
|
|
6
|
-
<latest>3.0.0-canary-
|
|
7
|
-
<release>3.0.0-canary-
|
|
6
|
+
<latest>3.0.0-canary-20250811-5c940c0</latest>
|
|
7
|
+
<release>3.0.0-canary-20250811-5c940c0</release>
|
|
8
8
|
<versions>
|
|
9
|
-
<version>3.0.0-canary-
|
|
9
|
+
<version>3.0.0-canary-20250811-5c940c0</version>
|
|
10
10
|
</versions>
|
|
11
|
-
<lastUpdated>
|
|
11
|
+
<lastUpdated>20250811152856</lastUpdated>
|
|
12
12
|
</versioning>
|
|
13
13
|
</metadata>
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
8fc79e351e629dd6310b36531e6bb4fa
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
a9bbcf9b7076d3cee48a67dfd9ba3c53d35a3303
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
330d6387f3a3c57e4f2685710c30db89d51a3ce15500900596a79b0c1b2f0dbd
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
ae65244d0aa7d6343510f79e57dd8e05da292b7123e2a277cb78d74e9f82342070abc000564c6d11c1bf21f856cbb9e650db6962bb63232e831d6877b4c1f7f9
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "expo-video",
|
|
3
3
|
"title": "Expo Video",
|
|
4
|
-
"version": "3.0.0-canary-
|
|
4
|
+
"version": "3.0.0-canary-20250811-5c940c0",
|
|
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": "4.1.
|
|
34
|
+
"expo-module-scripts": "4.1.11-canary-20250811-5c940c0"
|
|
35
35
|
},
|
|
36
36
|
"peerDependencies": {
|
|
37
|
-
"expo": "54.0.0-canary-
|
|
37
|
+
"expo": "54.0.0-canary-20250811-5c940c0",
|
|
38
38
|
"react": "*",
|
|
39
39
|
"react-native": "*"
|
|
40
40
|
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
8e27a8a108cbb6d261d95e1aad97e27a
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
66d3436151ca2150712aaca6132f42ae1c2b94c7
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
2fb05fdb332f403aee82cd5059ff214ef90621deea612eaaad68eb1fa6b86f1c
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
cba7f5a7ccefc07e58c85e3c26c279e5c8624fc0c84510814b3fda2bdf6ef73496ffa446816cfe45cf31dbda071f6d146b73d11ffe755ef77c484ccd56211f93
|
|
Binary file
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
efc5b8fa6220a70ce17f5c7b0a04b618
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
dd4ac4c73d71f37356240d7978c60e6668796a35
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
356699282396f6089d797276fadfe255438c6d315b5b197f1f9069f919665c17
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
9bbdd7b14aa471ce50972069209ace5b7f84790e377f5f69923693427084cea426ba002c64506288bac8d27865fb853d8c598e51617e1c485a96155562c1eceb
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
f487ef2d24b3b605398be4e33b1c328f
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
db8129f25f33de490c16d57528c0793dae8c2109
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
c73b7207544a508725b85c6825c627880044749b25ee2d7b742054514ba58a2a
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
bb7377573d2416dc3f9c2c6711eded7fce508edd1b267f45cf610850089d024d1cc0114d7445b563ca58bf862e103f0d3cf55db00e2e073a2000b750ace13695
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
92c58d5792f0cc77ec2edc00b1423c59
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
f25aa1d26202a46753b8ef0d9c9a3c91af200913
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
d3d4c31e78e3b1a7318f70fa4f1462c4d9122ab2b54760ab5857898a2786aa18
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
46d3c5f3e4eaa2964e912eaca83de5e97b04803bf6b3803b9fac0ed802f565432388264fdf6a860856fe5f458250ed838744b0eefd4221c1aa8e55497d52555d
|