Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我有一个包含 vitamio VideoView 的活动,它工作得很好,除了一个恼人的问题,它会导致播放器在我锁定屏幕时重新开始播放。
据我所见,它实际上在锁定时杀死了活动,然后重新启动它。任何人都知道如何解决这个问题?
在此先感谢,X
我最终做的是添加android:configChanges="orientation|screenSize" 到我的清单中。我在 VideoView 活动中添加videoView.pause();了我的 onPause() 函数,以确保它不会继续播放。
android:configChanges="orientation|screenSize"
videoView.pause();
即使这有效,我相信您必须强制 VideoView 活动的方向,除非您希望它在方向更改时看起来很奇怪。