libpag icon indicating copy to clipboard operation
libpag copied to clipboard

在动画更新回调里获取当前帧率存在丢帧的情况

Open myth2loki opened this issue 7 months ago • 5 comments

public void onAnimationUpdate(PAGView pagView) { long currentFrame = pagView.currentFrame(); Log.d(TAG, "xxx--->onAnimationUpdate:currentFrame="+currentFrame); }

在播放更新回调里获取当前帧率存在丢帧和重复的情况,建议在回调的时候把当前帧率,时间等现场信息封装通过回调参数返回,以防止在回调中获取导致信息差异

图一:100帧丢了 Image

图二:58帧重复了 Image

myth2loki avatar May 04 '25 01:05 myth2loki