Tencent / libpag

The official rendering library for PAG (Portable Animated Graphics) files that renders After Effects animations natively across multiple platforms.

Home Page:https://pag.art

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

使用pagImageview来实现seek的操作,如果外部传入的是时间戳,怎么进行seek?

tgitpushping opened this issue · comments

【平台信息】

iOS 原生

【预期的表现】

我看最新版本里面,去掉了numFrames。原本想通过下面这个接口来进行

  • (void)setCurrentFrame:(NSUInteger)currentFrame;
方案:获取整个文件的duration,再通过当前的需要seek到的pts 计算出需要seek到的currentFrame 再进行接口调用
    如果不用上面的方案进行转换的话,是直接调用- (void)setCurrentTime:(int64_t)time; 这个接口进行吗?

PAGImageView 提供了 numFrames 、 setCurrentFrame 的接口,通过上述方式就可以设置进度哈,不明白你所说的哪个地方去除了 numFrames,后续反馈问题建议描述清楚问题,比如哪个版本有,哪个版本移除了