[8.2.0][opt]Tts时静音视频
This commit is contained in:
@@ -52,10 +52,14 @@ object AudioFocusManager : MusicDataChangeListener {
|
||||
AuditionManager.setVolume(0.3f,0.3f)
|
||||
}
|
||||
}
|
||||
if (isPlayingVideo) {
|
||||
GSYVideoManager.instance().curPlayerManager?.setNeedMute(true)
|
||||
}
|
||||
}else{
|
||||
if(isPlayingMusic){
|
||||
AuditionManager.setVolume(1f,1f)
|
||||
}
|
||||
GSYVideoManager.instance().curPlayerManager?.setNeedMute(false)
|
||||
}
|
||||
}
|
||||
CallerLogger.d(TAG, "setTTSFocusChange $isPlayingTTS--$isPlayingMusic---$isPlayingVideo")
|
||||
@@ -71,6 +75,13 @@ object AudioFocusManager : MusicDataChangeListener {
|
||||
}else {
|
||||
AuditionManager.stop()
|
||||
}
|
||||
if (isPlayingTTS) {
|
||||
GSYVideoManager.instance().curPlayerManager?.setNeedMute(true)
|
||||
}
|
||||
} else {
|
||||
if (!isPlayingTTS) {
|
||||
GSYVideoManager.instance().curPlayerManager?.setNeedMute(false)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -6,8 +6,10 @@ import android.util.AttributeSet
|
||||
import com.mogo.eagle.core.utilcode.mogo.logger.Logger
|
||||
import com.mogo.eagle.core.widget.media.video.TextureVideoViewOutlineProvider
|
||||
import com.mogo.och.biz.media.video.MediaLoopPlayView
|
||||
import com.mogo.och.common.module.biz.media.MediaManager
|
||||
import com.shuyu.gsyvideoplayer.utils.GSYVideoType
|
||||
import com.shuyu.gsyvideoplayer.video.StandardGSYVideoPlayer
|
||||
import com.shuyu.gsyvideoplayer.video.base.GSYVideoView
|
||||
import me.jessyan.autosize.utils.AutoSizeUtils
|
||||
|
||||
class AdVideoPlayer : StandardGSYVideoPlayer {
|
||||
@@ -98,6 +100,18 @@ class AdVideoPlayer : StandardGSYVideoPlayer {
|
||||
isFocusableInTouchMode = false
|
||||
}
|
||||
|
||||
override fun updateStartImage() {
|
||||
super.updateStartImage()
|
||||
when (mCurrentState) {
|
||||
GSYVideoView.CURRENT_STATE_PLAYING ->{
|
||||
MediaManager.setVideoFocusChange(true)
|
||||
}
|
||||
else -> {
|
||||
MediaManager.setVideoFocusChange(false)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
fun setCacheImageViewVisible() {
|
||||
Logger.d(MediaLoopPlayView.TAG, "AdvanceGSYVideoPlayer,setCacheImageViewVisible")
|
||||
setViewShowState(mThumbImageViewLayout, VISIBLE)
|
||||
|
||||
Reference in New Issue
Block a user