Always show AVPlayer controls

扶醉桌前 提交于 2019-12-02 04:30:35

问题


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!


回答1:


You can set that by using Key-Value Coding

Swift:

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


来源:https://stackoverflow.com/questions/39660095/always-show-avplayer-controls

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!