我有使用AVPlayervewcontroller播放视频,但我面临着暂停视频的问题。 它有一种方法来停止视频比从beging开始,但我想暂停视频。如何在AVPlayervewcontroller中暂停视频?
请给我一些想法,我该如何做到这一点? Thanx
我有使用AVPlayervewcontroller播放视频,但我面临着暂停视频的问题。 它有一种方法来停止视频比从beging开始,但我想暂停视频。如何在AVPlayervewcontroller中暂停视频?
请给我一些想法,我该如何做到这一点? Thanx
AVPlayerViewController有一个AVPlayer(它的player
)。告诉玩家pause
,或将玩家的rate
设置为0
。这会暂停视频而不重置其播放头位置。
AVplayerviewcontroller has audioPlayer
property which which access the Player Object。要管理播放,请使用pause
方法。阅读完整的文档: - https://developer.apple.com/reference/avfoundation/avplayer/1387895-pause
代码例子以供参考: -
audioPlayer.pause()
你能否解释一下你说什么我没得到什么? –
不,我说过的一切都有说。 – matt