expo-video 2.2.2 → 2.3.0-canary-20250713-8f814f8
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 +11 -3
- package/android/build.gradle +2 -2
- package/android/src/main/AndroidManifest.xml +2 -2
- package/android/src/main/java/expo/modules/video/FullscreenPlayerActivity.kt +45 -3
- package/android/src/main/java/expo/modules/video/VideoExceptions.kt +3 -0
- package/android/src/main/java/expo/modules/video/VideoModule.kt +15 -1
- package/android/src/main/java/expo/modules/video/VideoView.kt +13 -0
- package/android/src/main/java/expo/modules/video/enums/FullscreenOrientation.kt +25 -0
- package/android/src/main/java/expo/modules/video/records/FullscreenOptions.kt +12 -0
- package/android/src/main/java/expo/modules/video/utils/FullscreenActivityOrientationHelper.kt +120 -0
- package/android/src/main/res/layout/fullscreen_player_activity.xml +2 -1
- package/build/NativeVideoAirPlayButtonView.d.ts +3 -0
- package/build/NativeVideoAirPlayButtonView.d.ts.map +1 -0
- package/build/NativeVideoAirPlayButtonView.js +3 -0
- package/build/NativeVideoAirPlayButtonView.js.map +1 -0
- package/build/NativeVideoModule.web.d.ts +3 -1
- package/build/NativeVideoModule.web.d.ts.map +1 -1
- package/build/NativeVideoModule.web.js +4 -1
- package/build/NativeVideoModule.web.js.map +1 -1
- package/build/VideoAirPlayButton.d.ts +10 -0
- package/build/VideoAirPlayButton.d.ts.map +1 -0
- package/build/VideoAirPlayButton.ios.d.ts +3 -0
- package/build/VideoAirPlayButton.ios.d.ts.map +1 -0
- package/build/VideoAirPlayButton.ios.js +5 -0
- package/build/VideoAirPlayButton.ios.js.map +1 -0
- package/build/VideoAirPlayButton.js +12 -0
- package/build/VideoAirPlayButton.js.map +1 -0
- package/build/VideoAirPlayButton.types.d.ts +35 -0
- package/build/VideoAirPlayButton.types.d.ts.map +1 -0
- package/build/VideoAirPlayButton.types.js +2 -0
- package/build/VideoAirPlayButton.types.js.map +1 -0
- package/build/VideoPlayer.types.d.ts +6 -0
- package/build/VideoPlayer.types.d.ts.map +1 -1
- package/build/VideoPlayer.types.js.map +1 -1
- package/build/VideoPlayer.web.d.ts +1 -0
- package/build/VideoPlayer.web.d.ts.map +1 -1
- package/build/VideoPlayer.web.js +1 -0
- package/build/VideoPlayer.web.js.map +1 -1
- package/build/VideoPlayerEvents.types.d.ts +16 -0
- package/build/VideoPlayerEvents.types.d.ts.map +1 -1
- package/build/VideoPlayerEvents.types.js.map +1 -1
- package/build/VideoView.d.ts.map +1 -1
- package/build/VideoView.js +3 -0
- package/build/VideoView.js.map +1 -1
- package/build/VideoView.types.d.ts +47 -0
- package/build/VideoView.types.d.ts.map +1 -1
- package/build/VideoView.types.js.map +1 -1
- package/build/index.d.ts +6 -4
- package/build/index.d.ts.map +1 -1
- package/build/index.js +1 -2
- package/build/index.js.map +1 -1
- package/expo-module.config.json +1 -1
- package/ios/Enums/FullscreenOrientation.swift +32 -0
- package/ios/ExpoVideo.podspec +1 -1
- package/ios/OrientationAVPlayerViewController.swift +215 -0
- package/ios/Records/FullscreenOptions.swift +12 -0
- package/ios/Records/VideoEventPayloads.swift +5 -0
- package/ios/VideoAirPlayButtonView.swift +70 -0
- package/ios/VideoManager.swift +2 -2
- package/ios/VideoModule.swift +31 -0
- package/ios/VideoPlayer.swift +9 -1
- package/ios/VideoPlayerItem.swift +5 -1
- package/ios/VideoPlayerObserver.swift +26 -0
- package/ios/VideoView.swift +13 -46
- package/local-maven-repo/host/exp/exponent/expo.modules.video/{2.2.2/expo.modules.video-2.2.2-sources.jar → 2.3.0-canary-20250713-8f814f8/expo.modules.video-2.3.0-canary-20250713-8f814f8-sources.jar} +0 -0
- package/local-maven-repo/host/exp/exponent/expo.modules.video/2.3.0-canary-20250713-8f814f8/expo.modules.video-2.3.0-canary-20250713-8f814f8-sources.jar.md5 +1 -0
- package/local-maven-repo/host/exp/exponent/expo.modules.video/2.3.0-canary-20250713-8f814f8/expo.modules.video-2.3.0-canary-20250713-8f814f8-sources.jar.sha1 +1 -0
- package/local-maven-repo/host/exp/exponent/expo.modules.video/2.3.0-canary-20250713-8f814f8/expo.modules.video-2.3.0-canary-20250713-8f814f8-sources.jar.sha256 +1 -0
- package/local-maven-repo/host/exp/exponent/expo.modules.video/2.3.0-canary-20250713-8f814f8/expo.modules.video-2.3.0-canary-20250713-8f814f8-sources.jar.sha512 +1 -0
- package/local-maven-repo/host/exp/exponent/expo.modules.video/2.3.0-canary-20250713-8f814f8/expo.modules.video-2.3.0-canary-20250713-8f814f8.aar +0 -0
- package/local-maven-repo/host/exp/exponent/expo.modules.video/2.3.0-canary-20250713-8f814f8/expo.modules.video-2.3.0-canary-20250713-8f814f8.aar.md5 +1 -0
- package/local-maven-repo/host/exp/exponent/expo.modules.video/2.3.0-canary-20250713-8f814f8/expo.modules.video-2.3.0-canary-20250713-8f814f8.aar.sha1 +1 -0
- package/local-maven-repo/host/exp/exponent/expo.modules.video/2.3.0-canary-20250713-8f814f8/expo.modules.video-2.3.0-canary-20250713-8f814f8.aar.sha256 +1 -0
- package/local-maven-repo/host/exp/exponent/expo.modules.video/2.3.0-canary-20250713-8f814f8/expo.modules.video-2.3.0-canary-20250713-8f814f8.aar.sha512 +1 -0
- package/local-maven-repo/host/exp/exponent/expo.modules.video/{2.2.2/expo.modules.video-2.2.2.module → 2.3.0-canary-20250713-8f814f8/expo.modules.video-2.3.0-canary-20250713-8f814f8.module} +24 -24
- package/local-maven-repo/host/exp/exponent/expo.modules.video/2.3.0-canary-20250713-8f814f8/expo.modules.video-2.3.0-canary-20250713-8f814f8.module.md5 +1 -0
- package/local-maven-repo/host/exp/exponent/expo.modules.video/2.3.0-canary-20250713-8f814f8/expo.modules.video-2.3.0-canary-20250713-8f814f8.module.sha1 +1 -0
- package/local-maven-repo/host/exp/exponent/expo.modules.video/2.3.0-canary-20250713-8f814f8/expo.modules.video-2.3.0-canary-20250713-8f814f8.module.sha256 +1 -0
- package/local-maven-repo/host/exp/exponent/expo.modules.video/2.3.0-canary-20250713-8f814f8/expo.modules.video-2.3.0-canary-20250713-8f814f8.module.sha512 +1 -0
- package/local-maven-repo/host/exp/exponent/expo.modules.video/{2.2.2/expo.modules.video-2.2.2.pom → 2.3.0-canary-20250713-8f814f8/expo.modules.video-2.3.0-canary-20250713-8f814f8.pom} +2 -2
- package/local-maven-repo/host/exp/exponent/expo.modules.video/2.3.0-canary-20250713-8f814f8/expo.modules.video-2.3.0-canary-20250713-8f814f8.pom.md5 +1 -0
- package/local-maven-repo/host/exp/exponent/expo.modules.video/2.3.0-canary-20250713-8f814f8/expo.modules.video-2.3.0-canary-20250713-8f814f8.pom.sha1 +1 -0
- package/local-maven-repo/host/exp/exponent/expo.modules.video/2.3.0-canary-20250713-8f814f8/expo.modules.video-2.3.0-canary-20250713-8f814f8.pom.sha256 +1 -0
- package/local-maven-repo/host/exp/exponent/expo.modules.video/2.3.0-canary-20250713-8f814f8/expo.modules.video-2.3.0-canary-20250713-8f814f8.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 +4 -5
- package/src/NativeVideoAirPlayButtonView.ts +3 -0
- package/src/NativeVideoModule.web.ts +4 -1
- package/src/VideoAirPlayButton.ios.tsx +8 -0
- package/src/VideoAirPlayButton.tsx +14 -0
- package/src/VideoAirPlayButton.types.ts +39 -0
- package/src/VideoPlayer.types.ts +7 -0
- package/src/VideoPlayer.web.tsx +1 -0
- package/src/VideoPlayerEvents.types.ts +19 -0
- package/src/VideoView.tsx +6 -0
- package/src/VideoView.types.ts +57 -0
- package/src/index.ts +6 -14
- package/local-maven-repo/host/exp/exponent/expo.modules.video/2.2.2/expo.modules.video-2.2.2-sources.jar.md5 +0 -1
- package/local-maven-repo/host/exp/exponent/expo.modules.video/2.2.2/expo.modules.video-2.2.2-sources.jar.sha1 +0 -1
- package/local-maven-repo/host/exp/exponent/expo.modules.video/2.2.2/expo.modules.video-2.2.2-sources.jar.sha256 +0 -1
- package/local-maven-repo/host/exp/exponent/expo.modules.video/2.2.2/expo.modules.video-2.2.2-sources.jar.sha512 +0 -1
- package/local-maven-repo/host/exp/exponent/expo.modules.video/2.2.2/expo.modules.video-2.2.2.aar +0 -0
- package/local-maven-repo/host/exp/exponent/expo.modules.video/2.2.2/expo.modules.video-2.2.2.aar.md5 +0 -1
- package/local-maven-repo/host/exp/exponent/expo.modules.video/2.2.2/expo.modules.video-2.2.2.aar.sha1 +0 -1
- package/local-maven-repo/host/exp/exponent/expo.modules.video/2.2.2/expo.modules.video-2.2.2.aar.sha256 +0 -1
- package/local-maven-repo/host/exp/exponent/expo.modules.video/2.2.2/expo.modules.video-2.2.2.aar.sha512 +0 -1
- package/local-maven-repo/host/exp/exponent/expo.modules.video/2.2.2/expo.modules.video-2.2.2.module.md5 +0 -1
- package/local-maven-repo/host/exp/exponent/expo.modules.video/2.2.2/expo.modules.video-2.2.2.module.sha1 +0 -1
- package/local-maven-repo/host/exp/exponent/expo.modules.video/2.2.2/expo.modules.video-2.2.2.module.sha256 +0 -1
- package/local-maven-repo/host/exp/exponent/expo.modules.video/2.2.2/expo.modules.video-2.2.2.module.sha512 +0 -1
- package/local-maven-repo/host/exp/exponent/expo.modules.video/2.2.2/expo.modules.video-2.2.2.pom.md5 +0 -1
- package/local-maven-repo/host/exp/exponent/expo.modules.video/2.2.2/expo.modules.video-2.2.2.pom.sha1 +0 -1
- package/local-maven-repo/host/exp/exponent/expo.modules.video/2.2.2/expo.modules.video-2.2.2.pom.sha256 +0 -1
- package/local-maven-repo/host/exp/exponent/expo.modules.video/2.2.2/expo.modules.video-2.2.2.pom.sha512 +0 -1
package/CHANGELOG.md
CHANGED
|
@@ -6,21 +6,29 @@
|
|
|
6
6
|
|
|
7
7
|
### 🎉 New features
|
|
8
8
|
|
|
9
|
+
- [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))
|
|
10
|
+
- Add fullscreen orientation and auto-exit functionality. ([#36910](https://github.com/expo/expo/pull/36910) by [@behenate](https://github.com/behenate))
|
|
11
|
+
|
|
9
12
|
### 🐛 Bug fixes
|
|
10
13
|
|
|
14
|
+
- [Android] Fix accessing player.loop causes app to crash. ([#37928](https://github.com/expo/expo/pull/37928) by [@Wenszel](https://github.com/Wenszel))
|
|
15
|
+
- [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))
|
|
16
|
+
|
|
11
17
|
### 💡 Others
|
|
12
18
|
|
|
13
|
-
|
|
19
|
+
- Export types using the `export type` syntax. ([#37396](https://github.com/expo/expo/pull/37396) by [@behenate](https://github.com/behenate))
|
|
20
|
+
|
|
21
|
+
## 2.2.2 - 2025-06-18
|
|
14
22
|
|
|
15
23
|
### 🐛 Bug fixes
|
|
16
24
|
|
|
17
25
|
- [Android] Fix aspect ratio of the Picture in Picture window when auto-entering for sources with ratio different from 16:9. ([#37225](https://github.com/expo/expo/pull/37225) by [@behenate](https://github.com/behenate))
|
|
18
26
|
|
|
19
|
-
## 2.2.1
|
|
27
|
+
## 2.2.1 - 2025-06-10
|
|
20
28
|
|
|
21
29
|
_This version does not introduce any user-facing changes._
|
|
22
30
|
|
|
23
|
-
## 2.2.0
|
|
31
|
+
## 2.2.0 - 2025-06-04
|
|
24
32
|
|
|
25
33
|
### 🎉 New features
|
|
26
34
|
|
package/android/build.gradle
CHANGED
|
@@ -4,13 +4,13 @@ plugins {
|
|
|
4
4
|
}
|
|
5
5
|
|
|
6
6
|
group = 'host.exp.exponent'
|
|
7
|
-
version = '2.
|
|
7
|
+
version = '2.3.0-canary-20250713-8f814f8'
|
|
8
8
|
|
|
9
9
|
android {
|
|
10
10
|
namespace "expo.modules.video"
|
|
11
11
|
defaultConfig {
|
|
12
12
|
versionCode 1
|
|
13
|
-
versionName '2.
|
|
13
|
+
versionName '2.3.0-canary-20250713-8f814f8'
|
|
14
14
|
}
|
|
15
15
|
}
|
|
16
16
|
|
|
@@ -6,8 +6,8 @@
|
|
|
6
6
|
<application>
|
|
7
7
|
<activity android:name=".FullscreenPlayerActivity"
|
|
8
8
|
android:supportsPictureInPicture="true"
|
|
9
|
-
android:configChanges="screenSize|smallestScreenSize|screenLayout|orientation"
|
|
10
|
-
android:theme="@style/Fullscreen"/>
|
|
9
|
+
android:configChanges="screenSize|smallestScreenSize|screenLayout|orientation|navigation"
|
|
10
|
+
android:theme="@style/Fullscreen" />
|
|
11
11
|
<service
|
|
12
12
|
android:name=".playbackService.ExpoVideoPlaybackService"
|
|
13
13
|
android:exported="false"
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
package expo.modules.video
|
|
2
2
|
|
|
3
3
|
import android.app.Activity
|
|
4
|
+
import android.content.pm.ActivityInfo
|
|
4
5
|
import android.content.res.Configuration
|
|
5
6
|
import android.os.Build
|
|
6
7
|
import android.os.Bundle
|
|
@@ -12,6 +13,8 @@ import android.widget.ImageButton
|
|
|
12
13
|
import androidx.media3.ui.PlayerView
|
|
13
14
|
import expo.modules.kotlin.exception.CodedException
|
|
14
15
|
import expo.modules.video.player.VideoPlayer
|
|
16
|
+
import expo.modules.video.records.FullscreenOptions
|
|
17
|
+
import expo.modules.video.utils.FullscreenActivityOrientationHelper
|
|
15
18
|
import expo.modules.video.utils.applyPiPParams
|
|
16
19
|
import expo.modules.video.utils.applyRectHint
|
|
17
20
|
import expo.modules.video.utils.calculatePiPAspectRatio
|
|
@@ -26,22 +29,49 @@ class FullscreenPlayerActivity : Activity() {
|
|
|
26
29
|
private lateinit var videoView: VideoView
|
|
27
30
|
private var didFinish = false
|
|
28
31
|
private var wasAutoPaused = false
|
|
32
|
+
private lateinit var options: FullscreenOptions
|
|
33
|
+
private lateinit var orientationHelper: FullscreenActivityOrientationHelper
|
|
29
34
|
|
|
30
35
|
override fun onCreate(savedInstanceState: Bundle?) {
|
|
31
36
|
super.onCreate(savedInstanceState)
|
|
32
|
-
setContentView(R.layout.fullscreen_player_activity)
|
|
33
|
-
mContentView = findViewById(R.id.enclosing_layout)
|
|
34
|
-
playerView = findViewById(R.id.player_view)
|
|
35
37
|
|
|
36
38
|
try {
|
|
37
39
|
videoViewId = intent.getStringExtra(VideoManager.INTENT_PLAYER_KEY)
|
|
38
40
|
?: throw FullScreenVideoViewNotFoundException()
|
|
41
|
+
|
|
42
|
+
options = if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.TIRAMISU) {
|
|
43
|
+
intent.getSerializableExtra(INTENT_FULLSCREEN_OPTIONS_KEY, FullscreenOptions::class.java)
|
|
44
|
+
?: throw FullScreenOptionsNotFoundException()
|
|
45
|
+
} else {
|
|
46
|
+
@Suppress("DEPRECATION")
|
|
47
|
+
intent.getSerializableExtra(INTENT_FULLSCREEN_OPTIONS_KEY) as? FullscreenOptions
|
|
48
|
+
?: throw FullScreenOptionsNotFoundException()
|
|
49
|
+
}
|
|
50
|
+
|
|
39
51
|
videoView = VideoManager.getVideoView(videoViewId)
|
|
52
|
+
|
|
53
|
+
orientationHelper = FullscreenActivityOrientationHelper(
|
|
54
|
+
this,
|
|
55
|
+
options,
|
|
56
|
+
onShouldAutoExit = {
|
|
57
|
+
finish()
|
|
58
|
+
},
|
|
59
|
+
onShouldReleaseOrientation = {
|
|
60
|
+
requestedOrientation = ActivityInfo.SCREEN_ORIENTATION_UNSPECIFIED
|
|
61
|
+
}
|
|
62
|
+
)
|
|
63
|
+
orientationHelper.startOrientationEventListener()
|
|
40
64
|
} catch (e: CodedException) {
|
|
41
65
|
Log.e("ExpoVideo", "${e.message}", e)
|
|
42
66
|
finish()
|
|
43
67
|
return
|
|
44
68
|
}
|
|
69
|
+
|
|
70
|
+
setContentView(R.layout.fullscreen_player_activity)
|
|
71
|
+
mContentView = findViewById(R.id.enclosing_layout)
|
|
72
|
+
playerView = findViewById(R.id.player_view)
|
|
73
|
+
requestedOrientation = options.orientation.toActivityOrientation()
|
|
74
|
+
|
|
45
75
|
videoPlayer = videoView.videoPlayer
|
|
46
76
|
videoPlayer?.changePlayerView(playerView)
|
|
47
77
|
VideoManager.registerFullscreenPlayerActivity(hashCode().toString(), this)
|
|
@@ -83,6 +113,7 @@ class FullscreenPlayerActivity : Activity() {
|
|
|
83
113
|
}
|
|
84
114
|
|
|
85
115
|
override fun onResume() {
|
|
116
|
+
orientationHelper.startOrientationEventListener()
|
|
86
117
|
playerView.useController = videoView.useNativeControls
|
|
87
118
|
super.onResume()
|
|
88
119
|
}
|
|
@@ -95,6 +126,7 @@ class FullscreenPlayerActivity : Activity() {
|
|
|
95
126
|
videoPlayer?.player?.pause()
|
|
96
127
|
}
|
|
97
128
|
}
|
|
129
|
+
orientationHelper.stopOrientationEventListener()
|
|
98
130
|
super.onPause()
|
|
99
131
|
}
|
|
100
132
|
|
|
@@ -102,6 +134,7 @@ class FullscreenPlayerActivity : Activity() {
|
|
|
102
134
|
super.onDestroy()
|
|
103
135
|
videoView.exitFullscreen()
|
|
104
136
|
VideoManager.unregisterFullscreenPlayerActivity(hashCode().toString())
|
|
137
|
+
orientationHelper.stopOrientationEventListener()
|
|
105
138
|
}
|
|
106
139
|
|
|
107
140
|
private fun setupFullscreenButton() {
|
|
@@ -142,4 +175,13 @@ class FullscreenPlayerActivity : Activity() {
|
|
|
142
175
|
)
|
|
143
176
|
}
|
|
144
177
|
}
|
|
178
|
+
|
|
179
|
+
override fun onConfigurationChanged(newConfig: Configuration) {
|
|
180
|
+
super.onConfigurationChanged(newConfig)
|
|
181
|
+
orientationHelper.onConfigurationChanged(newConfig)
|
|
182
|
+
}
|
|
183
|
+
|
|
184
|
+
companion object {
|
|
185
|
+
const val INTENT_FULLSCREEN_OPTIONS_KEY = "fullscreen_options"
|
|
186
|
+
}
|
|
145
187
|
}
|
|
@@ -6,6 +6,9 @@ import expo.modules.video.enums.DRMType
|
|
|
6
6
|
internal class FullScreenVideoViewNotFoundException :
|
|
7
7
|
CodedException("VideoView id wasn't passed to the activity")
|
|
8
8
|
|
|
9
|
+
internal class FullScreenOptionsNotFoundException :
|
|
10
|
+
CodedException("Fullscreen options were not passed to the activity")
|
|
11
|
+
|
|
9
12
|
internal class VideoViewNotFoundException(id: String) :
|
|
10
13
|
CodedException("VideoView with id: $id not found")
|
|
11
14
|
|
|
@@ -20,6 +20,7 @@ import expo.modules.video.enums.AudioMixingMode
|
|
|
20
20
|
import expo.modules.video.enums.ContentFit
|
|
21
21
|
import expo.modules.video.player.VideoPlayer
|
|
22
22
|
import expo.modules.video.records.BufferOptions
|
|
23
|
+
import expo.modules.video.records.FullscreenOptions
|
|
23
24
|
import expo.modules.video.records.SubtitleTrack
|
|
24
25
|
import expo.modules.video.records.AudioTrack
|
|
25
26
|
import expo.modules.video.records.VideoSource
|
|
@@ -225,7 +226,9 @@ class VideoModule : Module() {
|
|
|
225
226
|
|
|
226
227
|
Property("loop")
|
|
227
228
|
.get { ref: VideoPlayer ->
|
|
228
|
-
|
|
229
|
+
runBlocking(appContext.mainQueue.coroutineContext) {
|
|
230
|
+
ref.player.repeatMode == REPEAT_MODE_ONE
|
|
231
|
+
}
|
|
229
232
|
}
|
|
230
233
|
.set { ref: VideoPlayer, loop: Boolean ->
|
|
231
234
|
appContext.mainQueue.launch {
|
|
@@ -253,6 +256,12 @@ class VideoModule : Module() {
|
|
|
253
256
|
ref.bufferOptions = bufferOptions
|
|
254
257
|
}
|
|
255
258
|
|
|
259
|
+
Property("isExternalPlaybackActive")
|
|
260
|
+
.get { ref: VideoPlayer ->
|
|
261
|
+
// isExternalPlaybackActive is not supported on Android as of now. Return false.
|
|
262
|
+
false
|
|
263
|
+
}
|
|
264
|
+
|
|
256
265
|
Function("play") { ref: VideoPlayer ->
|
|
257
266
|
appContext.mainQueue.launch {
|
|
258
267
|
ref.player.play()
|
|
@@ -381,6 +390,11 @@ private inline fun <reified T : VideoView> ViewDefinitionBuilder<T>.VideoViewCom
|
|
|
381
390
|
Prop("allowsFullscreen") { view: T, allowsFullscreen: Boolean? ->
|
|
382
391
|
view.allowsFullscreen = allowsFullscreen ?: true
|
|
383
392
|
}
|
|
393
|
+
Prop("fullscreenOptions") { view: T, fullscreenOptions: FullscreenOptions? ->
|
|
394
|
+
if (fullscreenOptions != null) {
|
|
395
|
+
view.fullscreenOptions = fullscreenOptions
|
|
396
|
+
}
|
|
397
|
+
}
|
|
384
398
|
Prop("requiresLinearPlayback") { view: T, requiresLinearPlayback: Boolean? ->
|
|
385
399
|
val linearPlayback = requiresLinearPlayback ?: false
|
|
386
400
|
view.playerView.applyRequiresLinearPlayback(linearPlayback)
|
|
@@ -33,6 +33,7 @@ import expo.modules.video.records.SubtitleTrack
|
|
|
33
33
|
import expo.modules.video.records.VideoSource
|
|
34
34
|
import expo.modules.video.records.VideoTrack
|
|
35
35
|
import expo.modules.video.utils.applyPiPParams
|
|
36
|
+
import expo.modules.video.records.FullscreenOptions
|
|
36
37
|
import expo.modules.video.utils.applyRectHint
|
|
37
38
|
import expo.modules.video.utils.calculatePiPAspectRatio
|
|
38
39
|
import expo.modules.video.utils.calculateRectHint
|
|
@@ -132,6 +133,17 @@ open class VideoView(context: Context, appContext: AppContext, useTextureView: B
|
|
|
132
133
|
field = value
|
|
133
134
|
}
|
|
134
135
|
|
|
136
|
+
var fullscreenOptions: FullscreenOptions = FullscreenOptions()
|
|
137
|
+
set(value) {
|
|
138
|
+
field = value
|
|
139
|
+
if (value.enable) {
|
|
140
|
+
playerView.setFullscreenButtonClickListener { enterFullscreen() }
|
|
141
|
+
} else {
|
|
142
|
+
playerView.setFullscreenButtonClickListener(null)
|
|
143
|
+
playerView.setFullscreenButtonVisibility(false)
|
|
144
|
+
}
|
|
145
|
+
}
|
|
146
|
+
|
|
135
147
|
private val mLayoutRunnable = Runnable {
|
|
136
148
|
measure(
|
|
137
149
|
MeasureSpec.makeMeasureSpec(width, MeasureSpec.EXACTLY),
|
|
@@ -172,6 +184,7 @@ open class VideoView(context: Context, appContext: AppContext, useTextureView: B
|
|
|
172
184
|
fun enterFullscreen() {
|
|
173
185
|
val intent = Intent(context, FullscreenPlayerActivity::class.java)
|
|
174
186
|
intent.putExtra(VideoManager.INTENT_PLAYER_KEY, videoViewId)
|
|
187
|
+
intent.putExtra(FullscreenPlayerActivity.INTENT_FULLSCREEN_OPTIONS_KEY, fullscreenOptions)
|
|
175
188
|
// Set before starting the activity to avoid entering PiP unintentionally
|
|
176
189
|
isInFullscreen = true
|
|
177
190
|
currentActivity.startActivity(intent)
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
package expo.modules.video.enums
|
|
2
|
+
import expo.modules.kotlin.types.Enumerable
|
|
3
|
+
import android.content.pm.ActivityInfo
|
|
4
|
+
|
|
5
|
+
enum class FullscreenOrientation(val value: String) : Enumerable {
|
|
6
|
+
LANDSCAPE("landscape"),
|
|
7
|
+
PORTRAIT("portrait"),
|
|
8
|
+
LANDSCAPE_LEFT("landscapeLeft"),
|
|
9
|
+
LANDSCAPE_RIGHT("landscapeRight"),
|
|
10
|
+
PORTRAIT_UP("portraitUp"),
|
|
11
|
+
PORTRAIT_DOWN("portraitDown"),
|
|
12
|
+
DEFAULT("default");
|
|
13
|
+
|
|
14
|
+
fun toActivityOrientation(): Int {
|
|
15
|
+
return when (this) {
|
|
16
|
+
LANDSCAPE -> ActivityInfo.SCREEN_ORIENTATION_USER_LANDSCAPE
|
|
17
|
+
PORTRAIT -> ActivityInfo.SCREEN_ORIENTATION_USER_PORTRAIT
|
|
18
|
+
LANDSCAPE_LEFT -> ActivityInfo.SCREEN_ORIENTATION_LANDSCAPE
|
|
19
|
+
LANDSCAPE_RIGHT -> ActivityInfo.SCREEN_ORIENTATION_REVERSE_LANDSCAPE
|
|
20
|
+
PORTRAIT_UP -> ActivityInfo.SCREEN_ORIENTATION_PORTRAIT
|
|
21
|
+
PORTRAIT_DOWN -> ActivityInfo.SCREEN_ORIENTATION_REVERSE_PORTRAIT
|
|
22
|
+
DEFAULT -> ActivityInfo.SCREEN_ORIENTATION_UNSPECIFIED
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
package expo.modules.video.records
|
|
2
|
+
|
|
3
|
+
import expo.modules.kotlin.records.Field
|
|
4
|
+
import expo.modules.kotlin.records.Record
|
|
5
|
+
import expo.modules.video.enums.FullscreenOrientation
|
|
6
|
+
import java.io.Serializable
|
|
7
|
+
|
|
8
|
+
data class FullscreenOptions(
|
|
9
|
+
@Field val enable: Boolean = true,
|
|
10
|
+
@Field val orientation: FullscreenOrientation = FullscreenOrientation.DEFAULT,
|
|
11
|
+
@Field val autoExitOnRotate: Boolean = false
|
|
12
|
+
) : Record, Serializable
|
|
@@ -0,0 +1,120 @@
|
|
|
1
|
+
package expo.modules.video.utils
|
|
2
|
+
|
|
3
|
+
import android.content.Context
|
|
4
|
+
import android.content.res.Configuration
|
|
5
|
+
import android.hardware.SensorManager
|
|
6
|
+
import android.provider.Settings
|
|
7
|
+
import android.view.OrientationEventListener
|
|
8
|
+
import expo.modules.video.enums.FullscreenOrientation
|
|
9
|
+
import expo.modules.video.records.FullscreenOptions
|
|
10
|
+
|
|
11
|
+
/**
|
|
12
|
+
* Helper for the auto-exit fullscreen functionality. Once the user has rotated the phone to the desired orientation, the orientation lock should be released, so that once rotation to a perpendicular orientation is detected, the fullscreen can be exited.
|
|
13
|
+
*/
|
|
14
|
+
class FullscreenActivityOrientationHelper(val context: Context, val options: FullscreenOptions, val onShouldAutoExit: (() -> Unit), val onShouldReleaseOrientation: (() -> Unit)) {
|
|
15
|
+
private var userHasRotatedToVideoOrientation = false
|
|
16
|
+
private val isLockedToLandscape = options.orientation == FullscreenOrientation.LANDSCAPE ||
|
|
17
|
+
options.orientation == FullscreenOrientation.LANDSCAPE_LEFT ||
|
|
18
|
+
options.orientation == FullscreenOrientation.LANDSCAPE_RIGHT
|
|
19
|
+
|
|
20
|
+
private val isLockedToPortrait = options.orientation == FullscreenOrientation.PORTRAIT ||
|
|
21
|
+
options.orientation == FullscreenOrientation.PORTRAIT_UP ||
|
|
22
|
+
options.orientation == FullscreenOrientation.PORTRAIT_DOWN
|
|
23
|
+
|
|
24
|
+
/**
|
|
25
|
+
* Checks if the system's auto-rotation setting is currently enabled.
|
|
26
|
+
* Returns true if auto-rotation is unlocked (enabled), false otherwise (locked or error).
|
|
27
|
+
*/
|
|
28
|
+
val isAutoRotationEnabled: Boolean
|
|
29
|
+
get() {
|
|
30
|
+
return try {
|
|
31
|
+
val rotationStatus = Settings.System.getInt(
|
|
32
|
+
context.contentResolver,
|
|
33
|
+
Settings.System.ACCELEROMETER_ROTATION,
|
|
34
|
+
0
|
|
35
|
+
)
|
|
36
|
+
rotationStatus == 1
|
|
37
|
+
} catch (e: Exception) {
|
|
38
|
+
false
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
/* Orientation listener running while the activity orientation is locked. The goal of the listener is to detect if the user has rotated the phone to the desired orientation.
|
|
43
|
+
Once they have done that auto-exit can be activated. That's when we can disable the lock and wait for the device to be rotated to portrait.
|
|
44
|
+
When the screen starts rotating we receive a configuration change and can send a signal to exit fullscreen.
|
|
45
|
+
It's better to unlock and wait for config change instead of trying to detect orientation based on angles, because the angles update faster than the phone rotation.
|
|
46
|
+
*/
|
|
47
|
+
private val orientationEventListener by lazy {
|
|
48
|
+
object : OrientationEventListener(context, SensorManager.SENSOR_DELAY_NORMAL) {
|
|
49
|
+
override fun onOrientationChanged(orientation: Int) {
|
|
50
|
+
// Use narrower ranges to determine the orientation. Using a 90 degree range is too sensitive to small tilts.
|
|
51
|
+
val newPhysicalOrientation = when {
|
|
52
|
+
(orientation >= 0 && orientation <= 10) || (orientation >= 350 && orientation < 360) -> {
|
|
53
|
+
Configuration.ORIENTATION_PORTRAIT
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
(orientation >= 80 && orientation <= 100) -> {
|
|
57
|
+
Configuration.ORIENTATION_LANDSCAPE
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
(orientation >= 170 && orientation <= 190) -> {
|
|
61
|
+
Configuration.ORIENTATION_PORTRAIT
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
(orientation >= 260 && orientation <= 280) -> {
|
|
65
|
+
Configuration.ORIENTATION_LANDSCAPE
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
else -> {
|
|
69
|
+
Configuration.ORIENTATION_UNDEFINED
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
if (!options.autoExitOnRotate) {
|
|
74
|
+
return
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
val canReleaseFromLandscape = newPhysicalOrientation == Configuration.ORIENTATION_PORTRAIT && isLockedToLandscape && userHasRotatedToVideoOrientation
|
|
78
|
+
val canReleaseFromPortrait = newPhysicalOrientation == Configuration.ORIENTATION_LANDSCAPE && isLockedToPortrait && userHasRotatedToVideoOrientation
|
|
79
|
+
|
|
80
|
+
if (canReleaseFromPortrait || canReleaseFromLandscape) {
|
|
81
|
+
if (!isAutoRotationEnabled) {
|
|
82
|
+
return
|
|
83
|
+
}
|
|
84
|
+
onShouldReleaseOrientation()
|
|
85
|
+
this@FullscreenActivityOrientationHelper.stopOrientationEventListener()
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
val hasRotatedToVideoOrientationPortrait = newPhysicalOrientation == Configuration.ORIENTATION_PORTRAIT && isLockedToPortrait && !userHasRotatedToVideoOrientation
|
|
89
|
+
val hasRotatedToVideoOrientationLandscape = newPhysicalOrientation == Configuration.ORIENTATION_LANDSCAPE && isLockedToLandscape && !userHasRotatedToVideoOrientation
|
|
90
|
+
|
|
91
|
+
if (hasRotatedToVideoOrientationPortrait || hasRotatedToVideoOrientationLandscape) {
|
|
92
|
+
userHasRotatedToVideoOrientation = true
|
|
93
|
+
}
|
|
94
|
+
}
|
|
95
|
+
}
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
fun onConfigurationChanged(newConfig: Configuration) {
|
|
99
|
+
val orientation = newConfig.orientation
|
|
100
|
+
if (!options.autoExitOnRotate) {
|
|
101
|
+
return
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
if (isLockedToPortrait && orientation == Configuration.ORIENTATION_LANDSCAPE) {
|
|
105
|
+
onShouldAutoExit()
|
|
106
|
+
} else if (isLockedToLandscape && orientation == Configuration.ORIENTATION_PORTRAIT) {
|
|
107
|
+
onShouldAutoExit()
|
|
108
|
+
}
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
fun startOrientationEventListener() {
|
|
112
|
+
if (orientationEventListener.canDetectOrientation()) {
|
|
113
|
+
orientationEventListener.enable()
|
|
114
|
+
}
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
fun stopOrientationEventListener() {
|
|
118
|
+
orientationEventListener.disable()
|
|
119
|
+
}
|
|
120
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"NativeVideoAirPlayButtonView.d.ts","sourceRoot":"","sources":["../src/NativeVideoAirPlayButtonView.ts"],"names":[],"mappings":";AAEA,wBAAwE"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"NativeVideoAirPlayButtonView.js","sourceRoot":"","sources":["../src/NativeVideoAirPlayButtonView.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,MAAM,CAAC;AAEzC,eAAe,iBAAiB,CAAC,WAAW,EAAE,wBAAwB,CAAC,CAAC","sourcesContent":["import { requireNativeView } from 'expo';\n\nexport default requireNativeView('ExpoVideo', 'VideoAirPlayButtonView');\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"NativeVideoModule.web.d.ts","sourceRoot":"","sources":["../src/NativeVideoModule.web.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"NativeVideoModule.web.d.ts","sourceRoot":"","sources":["../src/NativeVideoModule.web.ts"],"names":[],"mappings":";;;AAAA,wBAGE"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"NativeVideoModule.web.js","sourceRoot":"","sources":["../src/NativeVideoModule.web.ts"],"names":[],"mappings":"AAAA,eAAe,GAAG,EAAE,GAAE,CAAC,CAAC","sourcesContent":["export default () => {};\n"]}
|
|
1
|
+
{"version":3,"file":"NativeVideoModule.web.js","sourceRoot":"","sources":["../src/NativeVideoModule.web.ts"],"names":[],"mappings":"AAAA,eAAe;IACb,kFAAkF;IAClF,cAAc,EAAE,GAAG,EAAE,GAAE,CAAC;CACzB,CAAC","sourcesContent":["export default {\n // Fixes webpack issues with NativeVideoModule.VideoThumbnail not existing on web.\n VideoThumbnail: () => {},\n};\n"]}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { VideoAirPlayButtonProps } from './VideoAirPlayButton.types';
|
|
2
|
+
/**
|
|
3
|
+
* A view displaying the [`AVRoutePickerView`](https://developer.apple.com/documentation/avkit/avroutepickerview). Shows a button, when pressed, an AirPlay device picker shows up, allowing users to stream the currently playing video
|
|
4
|
+
* to any available AirPlay sink.
|
|
5
|
+
*
|
|
6
|
+
* > When using this view, make sure that the [`allowsExternalPlayback`](#allowsexternalplayback) player property is set to `true`.
|
|
7
|
+
* @platform ios
|
|
8
|
+
*/
|
|
9
|
+
export default function VideoAirPlayButton(props: VideoAirPlayButtonProps): import("react").JSX.Element;
|
|
10
|
+
//# sourceMappingURL=VideoAirPlayButton.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"VideoAirPlayButton.d.ts","sourceRoot":"","sources":["../src/VideoAirPlayButton.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,uBAAuB,EAAE,MAAM,4BAA4B,CAAC;AAErE;;;;;;GAMG;AACH,MAAM,CAAC,OAAO,UAAU,kBAAkB,CAAC,KAAK,EAAE,uBAAuB,+BAExE"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"VideoAirPlayButton.ios.d.ts","sourceRoot":"","sources":["../src/VideoAirPlayButton.ios.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,uBAAuB,EAAE,MAAM,4BAA4B,CAAC;AAErE,MAAM,CAAC,OAAO,UAAU,kBAAkB,CAAC,KAAK,EAAE,uBAAuB,+BAIxE"}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import NativeVideoAirPlayButton from './NativeVideoAirPlayButtonView';
|
|
2
|
+
export default function VideoAirPlayButton(props) {
|
|
3
|
+
return (<NativeVideoAirPlayButton {...props} style={[{ minWidth: 30, minHeight: 30 }, props.style]}/>);
|
|
4
|
+
}
|
|
5
|
+
//# sourceMappingURL=VideoAirPlayButton.ios.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"VideoAirPlayButton.ios.js","sourceRoot":"","sources":["../src/VideoAirPlayButton.ios.tsx"],"names":[],"mappings":"AAAA,OAAO,wBAAwB,MAAM,gCAAgC,CAAC;AAGtE,MAAM,CAAC,OAAO,UAAU,kBAAkB,CAAC,KAA8B;IACvE,OAAO,CACL,CAAC,wBAAwB,CAAC,IAAI,KAAK,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,EAAE,QAAQ,EAAE,EAAE,EAAE,SAAS,EAAE,EAAE,EAAE,EAAE,KAAK,CAAC,KAAK,CAAC,CAAC,EAAG,CAC/F,CAAC;AACJ,CAAC","sourcesContent":["import NativeVideoAirPlayButton from './NativeVideoAirPlayButtonView';\nimport { VideoAirPlayButtonProps } from './VideoAirPlayButton.types';\n\nexport default function VideoAirPlayButton(props: VideoAirPlayButtonProps) {\n return (\n <NativeVideoAirPlayButton {...props} style={[{ minWidth: 30, minHeight: 30 }, props.style]} />\n );\n}\n"]}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { View } from 'react-native';
|
|
2
|
+
/**
|
|
3
|
+
* A view displaying the [`AVRoutePickerView`](https://developer.apple.com/documentation/avkit/avroutepickerview). Shows a button, when pressed, an AirPlay device picker shows up, allowing users to stream the currently playing video
|
|
4
|
+
* to any available AirPlay sink.
|
|
5
|
+
*
|
|
6
|
+
* > When using this view, make sure that the [`allowsExternalPlayback`](#allowsexternalplayback) player property is set to `true`.
|
|
7
|
+
* @platform ios
|
|
8
|
+
*/
|
|
9
|
+
export default function VideoAirPlayButton(props) {
|
|
10
|
+
return <View {...props} style={[{ minWidth: 30, minHeight: 30 }, props.style]}/>;
|
|
11
|
+
}
|
|
12
|
+
//# sourceMappingURL=VideoAirPlayButton.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"VideoAirPlayButton.js","sourceRoot":"","sources":["../src/VideoAirPlayButton.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,cAAc,CAAC;AAIpC;;;;;;GAMG;AACH,MAAM,CAAC,OAAO,UAAU,kBAAkB,CAAC,KAA8B;IACvE,OAAO,CAAC,IAAI,CAAC,IAAI,KAAK,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,EAAE,QAAQ,EAAE,EAAE,EAAE,SAAS,EAAE,EAAE,EAAE,EAAE,KAAK,CAAC,KAAK,CAAC,CAAC,EAAG,CAAC;AACpF,CAAC","sourcesContent":["import { View } from 'react-native';\n\nimport { VideoAirPlayButtonProps } from './VideoAirPlayButton.types';\n\n/**\n * A view displaying the [`AVRoutePickerView`](https://developer.apple.com/documentation/avkit/avroutepickerview). Shows a button, when pressed, an AirPlay device picker shows up, allowing users to stream the currently playing video\n * to any available AirPlay sink.\n *\n * > When using this view, make sure that the [`allowsExternalPlayback`](#allowsexternalplayback) player property is set to `true`.\n * @platform ios\n */\nexport default function VideoAirPlayButton(props: VideoAirPlayButtonProps) {\n return <View {...props} style={[{ minWidth: 30, minHeight: 30 }, props.style]} />;\n}\n"]}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { ColorValue, ViewProps } from 'react-native';
|
|
2
|
+
export interface VideoAirPlayButtonProps extends Omit<ViewProps, 'children'> {
|
|
3
|
+
/**
|
|
4
|
+
* The color of the button icon while AirPlay sharing is not active.
|
|
5
|
+
*
|
|
6
|
+
* @default undefined
|
|
7
|
+
* @platform ios
|
|
8
|
+
*/
|
|
9
|
+
tint?: ColorValue;
|
|
10
|
+
/**
|
|
11
|
+
* The color of the button icon while AirPlay sharing is active.
|
|
12
|
+
*
|
|
13
|
+
* @default undefined
|
|
14
|
+
* @platform ios
|
|
15
|
+
*/
|
|
16
|
+
activeTint?: ColorValue;
|
|
17
|
+
/**
|
|
18
|
+
* Determines whether the AirPlay device selection popup should show video outputs first.
|
|
19
|
+
*
|
|
20
|
+
* @default true
|
|
21
|
+
* @platform ios
|
|
22
|
+
*/
|
|
23
|
+
prioritizeVideoDevices?: boolean;
|
|
24
|
+
/**
|
|
25
|
+
* A callback called when the AirPlay route selection popup is about to show.
|
|
26
|
+
* @platform ios
|
|
27
|
+
*/
|
|
28
|
+
onBeginPresentingRoutes?: () => void;
|
|
29
|
+
/**
|
|
30
|
+
* A callback called when the AirPlay route selection popup has disappeared.
|
|
31
|
+
* @platform ios
|
|
32
|
+
*/
|
|
33
|
+
onEndPresentingRoutes?: () => void;
|
|
34
|
+
}
|
|
35
|
+
//# sourceMappingURL=VideoAirPlayButton.types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"VideoAirPlayButton.types.d.ts","sourceRoot":"","sources":["../src/VideoAirPlayButton.types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAErD,MAAM,WAAW,uBAAwB,SAAQ,IAAI,CAAC,SAAS,EAAE,UAAU,CAAC;IAC1E;;;;;OAKG;IACH,IAAI,CAAC,EAAE,UAAU,CAAC;IAElB;;;;;OAKG;IACH,UAAU,CAAC,EAAE,UAAU,CAAC;IAExB;;;;;OAKG;IACH,sBAAsB,CAAC,EAAE,OAAO,CAAC;IAEjC;;;OAGG;IACH,uBAAuB,CAAC,EAAE,MAAM,IAAI,CAAC;IAErC;;;OAGG;IACH,qBAAqB,CAAC,EAAE,MAAM,IAAI,CAAC;CACpC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"VideoAirPlayButton.types.js","sourceRoot":"","sources":["../src/VideoAirPlayButton.types.ts"],"names":[],"mappings":"","sourcesContent":["import { ColorValue, ViewProps } from 'react-native';\n\nexport interface VideoAirPlayButtonProps extends Omit<ViewProps, 'children'> {\n /**\n * The color of the button icon while AirPlay sharing is not active.\n *\n * @default undefined\n * @platform ios\n */\n tint?: ColorValue;\n\n /**\n * The color of the button icon while AirPlay sharing is active.\n *\n * @default undefined\n * @platform ios\n */\n activeTint?: ColorValue;\n\n /**\n * Determines whether the AirPlay device selection popup should show video outputs first.\n *\n * @default true\n * @platform ios\n */\n prioritizeVideoDevices?: boolean;\n\n /**\n * A callback called when the AirPlay route selection popup is about to show.\n * @platform ios\n */\n onBeginPresentingRoutes?: () => void;\n\n /**\n * A callback called when the AirPlay route selection popup has disappeared.\n * @platform ios\n */\n onEndPresentingRoutes?: () => void;\n}\n"]}
|
|
@@ -181,6 +181,12 @@ export declare class VideoPlayer extends SharedObject<VideoPlayerEvents> {
|
|
|
181
181
|
* @platform ios
|
|
182
182
|
*/
|
|
183
183
|
readonly availableVideoTracks: VideoTrack[];
|
|
184
|
+
/**
|
|
185
|
+
* Indicates whether the player is currently playing back the media to an external device via AirPlay.
|
|
186
|
+
*
|
|
187
|
+
* @platform ios
|
|
188
|
+
*/
|
|
189
|
+
readonly isExternalPlaybackActive: boolean;
|
|
184
190
|
/**
|
|
185
191
|
* Initializes a new video player instance with the given source.
|
|
186
192
|
*
|
|
@@ -1 +1 @@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