[8.2.2][fix]乘客屏修复mogomind公交站弹窗弹出存在视频数据时,导致广告播放器停止播放bug
This commit is contained in:
@@ -2,17 +2,24 @@ package com.mogo.och.biz.media.video.ads
|
||||
|
||||
import android.content.Context
|
||||
import android.media.AudioManager
|
||||
import android.text.TextUtils
|
||||
import android.util.AttributeSet
|
||||
import com.mogo.eagle.core.utilcode.mogo.logger.Logger
|
||||
import com.mogo.eagle.core.widget.media.video.CustomManager
|
||||
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.Debuger
|
||||
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
|
||||
import com.shuyu.gsyvideoplayer.video.base.GSYVideoViewBridge as GSYVideoViewBridge1
|
||||
|
||||
class AdVideoPlayer : StandardGSYVideoPlayer {
|
||||
companion object {
|
||||
private const val TAG = "AdVideoPlayer"
|
||||
}
|
||||
constructor(context: Context?) : super(context)
|
||||
constructor(context: Context?, attrs: AttributeSet?) : super(context, attrs)
|
||||
|
||||
@@ -40,7 +47,26 @@ class AdVideoPlayer : StandardGSYVideoPlayer {
|
||||
}
|
||||
}
|
||||
}
|
||||
override fun getGSYVideoManager(): GSYVideoViewBridge1 {
|
||||
CustomManager.getCustomManager(key).initContext(context.applicationContext)
|
||||
return CustomManager.getCustomManager(key)
|
||||
}
|
||||
|
||||
override fun backFromFull(context: Context): Boolean {
|
||||
return CustomManager.backFromWindowFull(context, key)
|
||||
}
|
||||
|
||||
override fun releaseVideos() {
|
||||
CustomManager.releaseAllVideos(key)
|
||||
}
|
||||
|
||||
override fun getFullId(): Int {
|
||||
return CustomManager.FULLSCREEN_ID
|
||||
}
|
||||
|
||||
override fun getSmallId(): Int {
|
||||
return CustomManager.SMALL_ID
|
||||
}
|
||||
override fun hideAllWidget() {
|
||||
Logger.d(MediaLoopPlayView.TAG, "AdvanceGSYVideoPlayer,hideAllWidget")
|
||||
}
|
||||
@@ -157,4 +183,15 @@ class AdVideoPlayer : StandardGSYVideoPlayer {
|
||||
this.clipToOutline = true
|
||||
}
|
||||
}
|
||||
|
||||
private val key: String
|
||||
get() {
|
||||
if (mPlayPosition == -22) {
|
||||
Debuger.printfError(javaClass.simpleName + " used getKey() " + "******* PlayPosition never set. ********")
|
||||
}
|
||||
if (TextUtils.isEmpty(mPlayTag)) {
|
||||
Debuger.printfError(javaClass.simpleName + " used getKey() " + "******* PlayTag never set. ********")
|
||||
}
|
||||
return TAG + mPlayPosition + mPlayTag
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user