expo-video 2.0.0-preview.2 → 2.0.0

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 CHANGED
@@ -10,6 +10,12 @@
10
10
 
11
11
  ### 💡 Others
12
12
 
13
+ ## 2.0.0 — 2024-11-11
14
+
15
+ ### 💡 Others
16
+
17
+ - [Android] Modify aspect ratio coverage of Android PiP to be more specific ([#32551](https://github.com/expo/expo/pull/32551) by [@YangJonghun](https://github.com/YangJonghun))
18
+
13
19
  ## 2.0.0-preview.2 — 2024-11-07
14
20
 
15
21
  ### 🎉 New features
@@ -1,7 +1,7 @@
1
1
  apply plugin: 'com.android.library'
2
2
 
3
3
  group = 'host.exp.exponent'
4
- version = '2.0.0-preview.2'
4
+ version = '2.0.0'
5
5
 
6
6
  def expoModulesCorePlugin = new File(project(":expo-modules-core").projectDir.absolutePath, "ExpoModulesCorePlugin.gradle")
7
7
  apply from: expoModulesCorePlugin
@@ -14,7 +14,7 @@ android {
14
14
  namespace "expo.modules.video"
15
15
  defaultConfig {
16
16
  versionCode 1
17
- versionName '2.0.0-preview.2'
17
+ versionName '2.0.0'
18
18
  }
19
19
  }
20
20
 
@@ -201,11 +201,14 @@ class VideoView(context: Context, appContext: AppContext) : ExpoView(context, ap
201
201
  } else {
202
202
  Rational(width, height)
203
203
  }
204
- // Android PiP doesn't support aspect ratios lower than 0.4184 or higher than 2.39
205
- if (aspectRatio.toFloat() > 2.39) {
206
- aspectRatio = Rational(239, 100)
207
- } else if (aspectRatio.toFloat() < 0.4184) {
208
- aspectRatio = Rational(10000, 4184)
204
+ // AspectRatio for the activity in picture-in-picture, must be between 2.39:1 and 1:2.39 (inclusive).
205
+ // https://developer.android.com/reference/android/app/PictureInPictureParams.Builder#setAspectRatio(android.util.Rational)
206
+ val maximumRatio = Rational(239, 100)
207
+ val minimumRatio = Rational(100, 239)
208
+ if (aspectRatio.toFloat() > maximumRatio.toFloat()) {
209
+ aspectRatio = maximumRatio
210
+ } else if (aspectRatio.toFloat() < minimumRatio.toFloat()) {
211
+ aspectRatio = minimumRatio
209
212
  }
210
213
 
211
214
  currentActivity.setPictureInPictureParams(
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "expo-video",
3
3
  "title": "Expo Video",
4
- "version": "2.0.0-preview.2",
4
+ "version": "2.0.0",
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",
@@ -38,5 +38,5 @@
38
38
  "react": "*",
39
39
  "react-native": "*"
40
40
  },
41
- "gitHead": "c0899e56c5be08b0142f06f05aa7bac8d6bc18b8"
41
+ "gitHead": "8f11fad6f46b878de4746b49b18599fc57b5729f"
42
42
  }