Skip to content

fix: OHOS PAGView autoPlay not working and setProgress not synced#1177

Open
wwwcg wants to merge 1 commit intoTencent-TDS:mainfrom
wwwcg:fix/pag
Open

fix: OHOS PAGView autoPlay not working and setProgress not synced#1177
wwwcg wants to merge 1 commit intoTencent-TDS:mainfrom
wwwcg:fix/pag

Conversation

@wwwcg
Copy link
Copy Markdown
Collaborator

@wwwcg wwwcg commented Mar 26, 2026

Summary

  • Fix autoPlay prop not taking effect on OHOS: KRPAGView.ets now intercepts autoPlay in setProp and implements a tryAutoPlay() mechanism (aligned with Android behavior)
  • Fix setProgress not synced to OHOS: add setProgress handling in KRPAGView.ets call() method, and add setProgress(value: number) to IKRPAGViewController interface

Test plan

  • Verify PAG animation auto-plays when autoPlay(true) is set
  • Verify PAG animation does not auto-play when autoPlay(false) is set
  • Verify setProgress(value) correctly updates playback progress on OHOS
  • Verify play() / stop() method calls work as expected

- KRPAGView.ets: 拦截autoPlay属性并实现tryAutoPlay机制,对齐Android端行为
- KRPAGView.ets: call()方法补充setProgress处理,解析JSON参数调用controller
- IKRPAGViewController: 接口新增setProgress(value: number)方法
- AppKRPAGAdapter: 示例适配器实现setProgress,委托PAGViewController
@wwwcg wwwcg changed the title fix: OHOS PAG组件autoPlay及setProgress未生效 fix: OHOS PAGView autoPlay not working and setProgress not synced Mar 26, 2026

stop(): void;

setProgress(value: number): void;
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

接口新增方法 建议文档备注 方便业务SDK升级适配

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants