@react-native-ohos/lottie-react-native 6.4.3-rc.3 → 6.4.3

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/README.md CHANGED
@@ -4,9 +4,9 @@ This project is based on [lottie-react-native](https://github.com/react-native-o
4
4
 
5
5
  ## Documentation
6
6
 
7
- - [中文](https://gitee.com/react-native-oh-library/usage-docs/blob/master/zh-cn/lottie-react-native.md)
7
+ - [中文](https://gitcode.com/OpenHarmony-RN/usage-docs/blob/master/zh-cn/lottie-react-native.md)
8
8
 
9
- - [English](https://gitee.com/react-native-oh-library/usage-docs/blob/master/en/lottie-react-native.md)
9
+ - [English](https://gitcode.com/OpenHarmony-RN/usage-docs/blob/master/en/lottie-react-native.md)
10
10
 
11
11
  ## License
12
12
 
@@ -0,0 +1,17 @@
1
+ /**
2
+ * Use these variables when you tailor your ArkTS code. They must be of the const type.
3
+ */
4
+ export const HAR_VERSION = '6.4.3';
5
+ export const BUILD_MODE_NAME = 'debug';
6
+ export const DEBUG = true;
7
+ export const TARGET_NAME = 'default';
8
+
9
+ /**
10
+ * BuildProfile Class is used only for compatibility purposes.
11
+ */
12
+ export default class BuildProfile {
13
+ static readonly HAR_VERSION = HAR_VERSION;
14
+ static readonly BUILD_MODE_NAME = BUILD_MODE_NAME;
15
+ static readonly DEBUG = DEBUG;
16
+ static readonly TARGET_NAME = TARGET_NAME;
17
+ }
@@ -6,9 +6,9 @@
6
6
  "name": "@react-native-ohos/lottie-react-native",
7
7
  "description": "Native part of lottie-react-native",
8
8
  "main": "index.ets",
9
- "version": "6.4.3-rc.3",
9
+ "version": "6.4.3",
10
10
  "dependencies": {
11
11
  "@rnoh/react-native-openharmony": "file:../react_native_openharmony",
12
- "@ohos/lottie": "2.0.25-rc.1"
12
+ "@ohos/lottie": "2.0.29-rc.1"
13
13
  }
14
14
  }
@@ -39,7 +39,8 @@ export struct LottieAnimationView {
39
39
  private animateItem: AnimationItem | null = null;
40
40
  private lottieCache = LottieCompositionCache.getInstance();
41
41
  private animateKey: string | null = null;
42
- private eventEmitter: RNC.LottieAnimationView.EventEmitter | undefined = undefined
42
+ private eventEmitter: RNC.LottieAnimationView.EventEmitter | undefined = undefined;
43
+ private isLoaded: boolean = false;
43
44
 
44
45
  aboutToAppear() {
45
46
  // 创建EventEmitter实例,用于处理事件的订阅和触发
@@ -183,6 +184,10 @@ export struct LottieAnimationView {
183
184
  }
184
185
 
185
186
  updateWatchData(): void {
187
+ if (!this.isLoaded) {
188
+ return;
189
+ }
190
+
186
191
  this.progress = this.descriptorWrapper.props.progress;
187
192
  this.speed = this.descriptorWrapper.props.speed;
188
193
  this.loop = Boolean(this.descriptorWrapper.props.loop);
@@ -247,6 +252,7 @@ export struct LottieAnimationView {
247
252
  animationData: this.jsonData
248
253
  });
249
254
  this.animateItem?.addEventListener(LOTTLE_STRING.DOMLoaded, () => {
255
+ this.isLoaded = true;
250
256
  try{
251
257
  let upperResizeMode =
252
258
  this.descriptorWrapper.props?.resizeMode?.replace(this.descriptorWrapper.props.resizeMode[0],
Binary file
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@react-native-ohos/lottie-react-native",
3
- "version": "6.4.3-rc.3",
3
+ "version": "6.4.3",
4
4
  "description": "c-api-foundation",
5
5
  "main": "lib/commonjs/index.js",
6
6
  "module": "lib/module/index.js",