[8.2.0][fix] 修复TTS播报时 广告视频静音失败问题
This commit is contained in:
@@ -100,15 +100,14 @@ class AdVideoPlayer : StandardGSYVideoPlayer {
|
||||
isFocusableInTouchMode = false
|
||||
}
|
||||
|
||||
override fun updateStartImage() {
|
||||
super.updateStartImage()
|
||||
when (mCurrentState) {
|
||||
GSYVideoView.CURRENT_STATE_PLAYING ->{
|
||||
MediaManager.setVideoFocusChange(true)
|
||||
}
|
||||
else -> {
|
||||
MediaManager.setVideoFocusChange(false)
|
||||
}
|
||||
private var oldPlaying = false
|
||||
override fun setStateAndUi(state: Int) {
|
||||
super.setStateAndUi(state)
|
||||
Logger.d("AdVideoPlayer", "播放状态 $state")
|
||||
val playing = state == GSYVideoView.CURRENT_STATE_PLAYING
|
||||
if (oldPlaying != playing) {
|
||||
oldPlaying = playing
|
||||
MediaManager.setVideoFocusChange(playing)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user