expo-video 1.2.4 → 1.2.5

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
+ ## 1.2.5 — 2024-08-20
14
+
15
+ ### 🐛 Bug fixes
16
+
17
+ - [Android] Fixed `resolvedLayoutDirection` building issues when using react-native 0.75.X. ([#31064](https://github.com/expo/expo/pull/31064) by [@gabrieldonadel](https://github.com/gabrieldonadel))
18
+
13
19
  ## 1.2.4 — 2024-07-30
14
20
 
15
21
  ### 🐛 Bug fixes
@@ -1,7 +1,7 @@
1
1
  apply plugin: 'com.android.library'
2
2
 
3
3
  group = 'host.exp.exponent'
4
- version = '1.2.4'
4
+ version = '1.2.5'
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 '1.2.4'
17
+ versionName '1.2.5'
18
18
  }
19
19
  }
20
20
 
@@ -292,14 +292,21 @@ class VideoView(context: Context, appContext: AppContext) : ExpoView(context, ap
292
292
 
293
293
  // Draw borders on top of the video
294
294
  if (borderDrawableLazyHolder.isInitialized()) {
295
- val layoutDirection = if (I18nUtil.getInstance().isRTL(context)) {
295
+ val newLayoutDirection = if (I18nUtil.getInstance().isRTL(context)) {
296
296
  LAYOUT_DIRECTION_RTL
297
297
  } else {
298
298
  LAYOUT_DIRECTION_LTR
299
299
  }
300
300
 
301
301
  borderDrawable.apply {
302
- resolvedLayoutDirection = layoutDirection
302
+ val setLayoutDirectionMethod = try {
303
+ // React Native 0.74.0 and below
304
+ ReactViewBackgroundDrawable::class.java.getDeclaredMethod("setResolvedLayoutDirection", Int::class.java)
305
+ } catch (e: NoSuchMethodException) {
306
+ // React Native 0.75.0 and above
307
+ ReactViewBackgroundDrawable::class.java.getMethod("setLayoutDirectionOverride", Int::class.java)
308
+ }
309
+ setLayoutDirectionMethod.invoke(this, newLayoutDirection)
303
310
  setBounds(0, 0, width, height)
304
311
  draw(canvas)
305
312
  }
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "expo-video",
3
3
  "title": "Expo Video",
4
- "version": "1.2.4",
4
+ "version": "1.2.5",
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",
@@ -36,5 +36,5 @@
36
36
  "peerDependencies": {
37
37
  "expo": "*"
38
38
  },
39
- "gitHead": "10eaf729822bf46ab821a000eb961cf8df40b35b"
39
+ "gitHead": "80d038d11d216793d00fa5b4607a2c6169cee814"
40
40
  }