react-native-firework-sdk 2.4.2-beta.2 → 2.4.2

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.
@@ -6,30 +6,30 @@
6
6
  <array>
7
7
  <dict>
8
8
  <key>LibraryIdentifier</key>
9
- <string>ios-arm64</string>
9
+ <string>ios-arm64_x86_64-simulator</string>
10
10
  <key>LibraryPath</key>
11
11
  <string>FireworkVideoUI.framework</string>
12
12
  <key>SupportedArchitectures</key>
13
13
  <array>
14
14
  <string>arm64</string>
15
+ <string>x86_64</string>
15
16
  </array>
16
17
  <key>SupportedPlatform</key>
17
18
  <string>ios</string>
19
+ <key>SupportedPlatformVariant</key>
20
+ <string>simulator</string>
18
21
  </dict>
19
22
  <dict>
20
23
  <key>LibraryIdentifier</key>
21
- <string>ios-arm64_x86_64-simulator</string>
24
+ <string>ios-arm64</string>
22
25
  <key>LibraryPath</key>
23
26
  <string>FireworkVideoUI.framework</string>
24
27
  <key>SupportedArchitectures</key>
25
28
  <array>
26
29
  <string>arm64</string>
27
- <string>x86_64</string>
28
30
  </array>
29
31
  <key>SupportedPlatform</key>
30
32
  <string>ios</string>
31
- <key>SupportedPlatformVariant</key>
32
- <string>simulator</string>
33
33
  </dict>
34
34
  </array>
35
35
  <key>CFBundlePackageType</key>
@@ -14,7 +14,7 @@
14
14
  </data>
15
15
  <key>Info.plist</key>
16
16
  <data>
17
- HscZIvvM5hLz4RTT8rldp8l8Gdw=
17
+ 85EsI3LO/3Cyvsf61nuxOhuVZjY=
18
18
  </data>
19
19
  <key>Modules/FireworkVideoUI.swiftmodule/arm64-apple-ios-simulator.abi.json</key>
20
20
  <data>
@@ -34,7 +34,7 @@
34
34
  </data>
35
35
  <key>Modules/FireworkVideoUI.swiftmodule/arm64-apple-ios-simulator.swiftmodule</key>
36
36
  <data>
37
- nZZz2lB1ErelnSv+O9gloXFq+Dg=
37
+ U9CO8neOEZlTjVcyhDMMHHG4/YM=
38
38
  </data>
39
39
  <key>Modules/FireworkVideoUI.swiftmodule/x86_64-apple-ios-simulator.abi.json</key>
40
40
  <data>
@@ -54,7 +54,7 @@
54
54
  </data>
55
55
  <key>Modules/FireworkVideoUI.swiftmodule/x86_64-apple-ios-simulator.swiftmodule</key>
56
56
  <data>
57
- meZHxNlnwmkMY32O52IchSz2crU=
57
+ rE9ajm1QFprR493JAZ435RBDf6k=
58
58
  </data>
59
59
  <key>Modules/module.modulemap</key>
60
60
  <data>
@@ -109,7 +109,7 @@
109
109
  <dict>
110
110
  <key>hash2</key>
111
111
  <data>
112
- jvJsm3kgmrd8WEOCFV8tZuAO3HCXbm21TYG8fB2bEEI=
112
+ 0ddv3wK4Qjt4wnjJHozoxn8jolUX8j+LUN6gNFs2nnY=
113
113
  </data>
114
114
  </dict>
115
115
  <key>Modules/FireworkVideoUI.swiftmodule/x86_64-apple-ios-simulator.abi.json</key>
@@ -144,7 +144,7 @@
144
144
  <dict>
145
145
  <key>hash2</key>
146
146
  <data>
147
- NF0fWJXky5+MngsohZwYuFA2SYqguNyIGtG9CjhXnMw=
147
+ /9FzYklE4V/jNQ9c8L6qFySvktwiHrfbVDGR/+e6kNA=
148
148
  </data>
149
149
  </dict>
150
150
  <key>Modules/module.modulemap</key>
@@ -29,18 +29,14 @@ extension UIView {
29
29
 
30
30
  @objc func fw_init(frame: CGRect) -> UIView {
31
31
  let view = self.fw_init(frame: frame)
32
- if view is FireworkPlayerView, AppLanguageManager.shared.shouldHorizontalFlip {
33
- view.viewType = .normal
34
- }
32
+ updateViewTypeIfNeeded(view)
35
33
 
36
34
  return view
37
35
  }
38
36
 
39
37
  @objc func fw_viewAwakeFromNib() {
40
38
  self.fw_viewAwakeFromNib()
41
- if self is FireworkPlayerView, AppLanguageManager.shared.shouldHorizontalFlip {
42
- self.viewType = .normal
43
- }
39
+ updateViewTypeIfNeeded(self)
44
40
  }
45
41
 
46
42
  @objc func fw_semanticContentAttribute() -> UISemanticContentAttribute {
@@ -50,4 +46,18 @@ extension UIView {
50
46
 
51
47
  return fw_semanticContentAttribute()
52
48
  }
49
+
50
+ private func updateViewTypeIfNeeded(_ view: UIView) {
51
+ if view is FireworkPlayerView, AppLanguageManager.shared.shouldHorizontalFlip {
52
+ view.viewType = .normal
53
+ }
54
+
55
+ DispatchQueue.main.async {
56
+ if view.layer.sublayers?.first(where: { layer in
57
+ layer is AVPlayerLayer
58
+ }) != nil, AppLanguageManager.shared.shouldHorizontalFlip {
59
+ view.viewType = .normal
60
+ }
61
+ }
62
+ }
53
63
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "react-native-firework-sdk",
3
- "version": "2.4.2-beta.2",
3
+ "version": "2.4.2",
4
4
  "description": "Firework React Native SDK",
5
5
  "main": "lib/commonjs/index",
6
6
  "module": "lib/module/index",