[m2]
[3.0.0] [glsurfaceview 叠加导致圆角无法使用暂时使用不使用]
This commit is contained in:
@@ -4,9 +4,10 @@ import android.content.Context
|
|||||||
import android.media.AudioManager
|
import android.media.AudioManager
|
||||||
import android.util.AttributeSet
|
import android.util.AttributeSet
|
||||||
import com.mogo.eagle.core.utilcode.mogo.logger.Logger
|
import com.mogo.eagle.core.utilcode.mogo.logger.Logger
|
||||||
import com.shuyu.gsyvideoplayer.utils.Debuger
|
import com.mogo.eagle.core.widget.media.video.TextureVideoViewOutlineProvider
|
||||||
import com.shuyu.gsyvideoplayer.utils.GSYVideoType
|
import com.shuyu.gsyvideoplayer.utils.GSYVideoType
|
||||||
import com.shuyu.gsyvideoplayer.video.StandardGSYVideoPlayer
|
import com.shuyu.gsyvideoplayer.video.StandardGSYVideoPlayer
|
||||||
|
import me.jessyan.autosize.utils.AutoSizeUtils
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @author: wangmingjun
|
* @author: wangmingjun
|
||||||
@@ -20,7 +21,7 @@ class AdvanceGSYVideoPlayer: StandardGSYVideoPlayer {
|
|||||||
init {
|
init {
|
||||||
hideWidget()
|
hideWidget()
|
||||||
GSYVideoType.setShowType(GSYVideoType.SCREEN_MATCH_FULL)
|
GSYVideoType.setShowType(GSYVideoType.SCREEN_MATCH_FULL)
|
||||||
GSYVideoType.setRenderType(GSYVideoType.GLSURFACE)
|
//GSYVideoType.setRenderType(GSYVideoType.GLSURFACE)
|
||||||
}
|
}
|
||||||
|
|
||||||
override fun hideAllWidget() {
|
override fun hideAllWidget() {
|
||||||
@@ -124,4 +125,13 @@ class AdvanceGSYVideoPlayer: StandardGSYVideoPlayer {
|
|||||||
private fun setNeedMute(isMute: Boolean){
|
private fun setNeedMute(isMute: Boolean){
|
||||||
gsyVideoManager?.player?.setNeedMute(isMute)
|
gsyVideoManager?.player?.setNeedMute(isMute)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
override fun onSizeChanged(w: Int, h: Int, oldw: Int, oldh: Int) {
|
||||||
|
super.onSizeChanged(w, h, oldw, oldh)
|
||||||
|
if (!mIfCurrentIsFullscreen) {
|
||||||
|
val dp2px = AutoSizeUtils.dp2px(context, 16f)
|
||||||
|
this.outlineProvider = TextureVideoViewOutlineProvider(dp2px.toFloat())
|
||||||
|
this.clipToOutline = true
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
@@ -13,9 +13,11 @@ import com.mogo.eagle.core.utilcode.mogo.logger.Logger
|
|||||||
import com.mogo.eagle.core.utilcode.util.FileUtils
|
import com.mogo.eagle.core.utilcode.util.FileUtils
|
||||||
import com.mogo.eagle.core.utilcode.util.ThreadUtils
|
import com.mogo.eagle.core.utilcode.util.ThreadUtils
|
||||||
import com.mogo.eagle.core.utilcode.util.UiThreadHandler
|
import com.mogo.eagle.core.utilcode.util.UiThreadHandler
|
||||||
|
import com.mogo.eagle.core.widget.media.video.TextureVideoViewOutlineProvider
|
||||||
import com.mogo.och.bus.passenger.R
|
import com.mogo.och.bus.passenger.R
|
||||||
import com.shuyu.gsyvideoplayer.builder.GSYVideoOptionBuilder
|
import com.shuyu.gsyvideoplayer.builder.GSYVideoOptionBuilder
|
||||||
import com.shuyu.gsyvideoplayer.listener.GSYSampleCallBack
|
import com.shuyu.gsyvideoplayer.listener.GSYSampleCallBack
|
||||||
|
import me.jessyan.autosize.utils.AutoSizeUtils
|
||||||
import java.io.File
|
import java.io.File
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -68,6 +70,9 @@ class AdvanceVideoView @JvmOverloads constructor(
|
|||||||
layoutParams.addRule(ALIGN_PARENT_RIGHT)
|
layoutParams.addRule(ALIGN_PARENT_RIGHT)
|
||||||
layoutParams.addRule(ALIGN_PARENT_TOP)
|
layoutParams.addRule(ALIGN_PARENT_TOP)
|
||||||
layoutParams.addRule(ALIGN_PARENT_BOTTOM)
|
layoutParams.addRule(ALIGN_PARENT_BOTTOM)
|
||||||
|
val dp2px = AutoSizeUtils.dp2px(context, 16f)
|
||||||
|
videoRelativeLayout?.outlineProvider = TextureVideoViewOutlineProvider(dp2px.toFloat())
|
||||||
|
videoRelativeLayout?.clipToOutline = true
|
||||||
|
|
||||||
videoRelativeLayout?.addView(videoViewPlayer, layoutParams)
|
videoRelativeLayout?.addView(videoViewPlayer, layoutParams)
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -62,6 +62,26 @@
|
|||||||
app:layout_constraintEnd_toEndOf="@+id/och_shadow_layout"
|
app:layout_constraintEnd_toEndOf="@+id/och_shadow_layout"
|
||||||
app:layout_constraintStart_toStartOf="@+id/och_shadow_layout"/>
|
app:layout_constraintStart_toStartOf="@+id/och_shadow_layout"/>
|
||||||
|
|
||||||
|
<!-- 消息盒子气泡-->
|
||||||
|
<com.mogo.eagle.core.function.hmi.ui.msgbox.MBoxBubbleView
|
||||||
|
android:id="@+id/box_bubble_view"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
app:layout_constraintTop_toBottomOf="@+id/och_shadow_layout"
|
||||||
|
app:layout_constraintLeft_toLeftOf="parent"
|
||||||
|
android:layout_marginTop="@dimen/dp_16"
|
||||||
|
android:layout_marginLeft="@dimen/dp_42"/>
|
||||||
|
|
||||||
|
<!--pnc行为决策-->
|
||||||
|
<com.mogo.eagle.core.function.hmi.ui.vehicle.PncActionsView
|
||||||
|
android:id="@+id/pnc_actions_view"
|
||||||
|
android:layout_width="@dimen/dp_231"
|
||||||
|
android:layout_height="@dimen/dp_36"
|
||||||
|
app:layout_constraintBottom_toTopOf="@+id/video_fragment"
|
||||||
|
android:layout_marginBottom="@dimen/dp_25"
|
||||||
|
app:layout_constraintLeft_toLeftOf="parent"
|
||||||
|
app:layout_constraintRight_toRightOf="parent"
|
||||||
|
app:background_resource="@drawable/bg_pnc" />
|
||||||
|
|
||||||
<!-- 图片或视频广告-->
|
<!-- 图片或视频广告-->
|
||||||
|
|
||||||
|
|||||||
@@ -11,24 +11,4 @@
|
|||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent"/>
|
android:layout_height="match_parent"/>
|
||||||
|
|
||||||
<!-- 消息盒子气泡-->
|
|
||||||
|
|
||||||
<com.mogo.eagle.core.function.hmi.ui.msgbox.MBoxBubbleView
|
|
||||||
android:id="@+id/box_bubble_view"
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
app:layout_constraintTop_toTopOf="parent"
|
|
||||||
app:layout_constraintLeft_toLeftOf="parent"
|
|
||||||
android:layout_marginTop="@dimen/dp_16"
|
|
||||||
android:layout_marginLeft="@dimen/dp_26"/>
|
|
||||||
|
|
||||||
<!--pnc行为决策-->
|
|
||||||
<com.mogo.eagle.core.function.hmi.ui.vehicle.PncActionsView
|
|
||||||
android:id="@+id/pnc_actions_view"
|
|
||||||
android:layout_width="@dimen/dp_231"
|
|
||||||
android:layout_height="@dimen/dp_36"
|
|
||||||
app:layout_constraintBottom_toBottomOf="parent"
|
|
||||||
app:layout_constraintLeft_toLeftOf="parent"
|
|
||||||
app:layout_constraintRight_toRightOf="parent"
|
|
||||||
app:background_resource="@drawable/bg_pnc" />
|
|
||||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||||
Reference in New Issue
Block a user