一律显示AVPlayer控件 [英] Always show AVPlayer controls

查看:89
本文介绍了一律显示AVPlayer控件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个带有AVPlayer的AVPlayerViewController,我需要的是播放器的控件(播放,暂停,时间滑块)永不隐藏.现在,在大约播放了4秒钟的视频后,该视频变为隐藏状态,您必须点按屏幕才能再次显示它们.我还没有找到解决办法..有什么想法吗?谢谢!

I have an AVPlayerViewController with a AVPlayer in it, and what I need is that the controls of the player (play, pause, time slider) never hides. Right now after more or less 4 seconds of playing the video the become hidden, and you have to tap the screen to show them again. I haven't been able to find a solution to that.. any ideas? thx!

推荐答案

您可以使用迅速:

 // playerController : AVPlayerViewController
 playerController.setValue(false, forKey: "canHidePlaybackControls")

这篇关于一律显示AVPlayer控件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆