AVPlayer - 为 CMTime 添加秒数

2024-02-08

如何将当前的播放时间增加 5 秒?
实际上这是我的代码:

CMTime currentTime = music.currentTime;

我无法使用 CMTimeGetSeconds() ,因为我需要 CMTime 格式。

谢谢您的回答...

编辑:如何为 CMTime 设置变量?


这是一种方法:

CMTimeMakeWithSeconds(CMTimeGetSeconds(music.currentTime) + 5, music.currentTime.timescale);
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)

AVPlayer - 为 CMTime 添加秒数 的相关文章

随机推荐