请教区间播放问题 #3264
Answered
by
libpag-bot
fushenghua
asked this question in
Q&A
请教区间播放问题
#3264
-
|
我在使用 PAG 实现分段动画时遇到了播放异常问题:素材时长 14s,计划先播 0-10s 一次,再循环播放 10-14s 片段,通过setStartTime设置播放起始点。 |
Beta Was this translation helpful? Give feedback.
Answered by
libpag-bot
Feb 5, 2026
Replies: 1 comment 1 reply
-
|
感谢反馈!推荐通过 private var isFirstPlay = true
- (void)onAnimationStart:(PAGView*)pagView {
if (!isFirstPlay) {
[pagView setProgress:10.0 / 14.0]; // 第二次开始从 10s 播放
}
isFirstPlay = false;
}关于播放变慢的问题,可能是容器的 duration 没有正确设置导致出现了时间拉伸,建议检查 PAGComposition 或 PAGFile 的 duration 设置是否正确。 |
Beta Was this translation helpful? Give feedback.
1 reply
Answer selected by
kevingpqi123
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
感谢反馈!推荐通过
onAnimationStart回调实现,第二次播放从 10s 开始:关于播放变慢的问题,可能是容器的 duration 没有正确设置导致出现了时间拉伸,建议检查 PAGComposition 或 PAGFile 的 duration 设置是否正确。