Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

请问下 ios有没有可以监听动画播放实时进度的API #5

Closed
XSVict opened this issue Dec 30, 2020 · 1 comment
Closed

请问下 ios有没有可以监听动画播放实时进度的API #5

XSVict opened this issue Dec 30, 2020 · 1 comment

Comments

@XSVict
Copy link

XSVict commented Dec 30, 2020

问题描述

问题

告诉我们你遇到了什么问题。

重现

说明重现步骤。加载的是什么文件,你的代码是怎么写的,等等。
PAG 素材可以在压缩之后,随这个 issue 上传。

环境

libpag 版本:libpag-ios(v3.2.4.37),libpag-android(v3.2.5.1),PAGViewer(2.1.33 beta)
设备:iPhone 7(iOS 12),OnePlus 7(Android 10),iMac 5K(macOS 10.15.3)

Demo(可选)

给一个 Demo 项目,我们可以运行并重现这个问题。

其他(可选)

添加其他内容

@domchen
Copy link
Collaborator

domchen commented Jan 1, 2021

有,onAnimationStart, onAnimationEnd,onAnimationCancel和onAnimationRepeat。请参考这里:https://pag.io/api.html#/apis/ios/Protocols/PAGViewListener.html 如果你的目的是只播放一个区间,不需要监听实时进度每帧来判断一下这么麻烦。有更简单的API,一次调用就行。PAGFile是可以任意组合修改包括调整时长的。你只需调用PAGFile.setStartTime和startDuration就可以控制播放的区间了。你也可以多个PAGFile组合到一起播放。创建一个空的PAGComposition,addLayer() 多个PAGFile到它里面,可以分别对每个PAGFile设置startTIme和duration以及matrix控制位置。然后把总的PAGComposition设置给PAGView播放即可。

@domchen domchen closed this as completed Jan 15, 2021
@gmfzxl gmfzxl mentioned this issue Apr 20, 2023
@zenglihao zenglihao mentioned this issue May 22, 2023
@zengke328 zengke328 mentioned this issue Jul 26, 2023
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

No branches or pull requests

2 participants