From f7729c75579145c1296b4c57dc326f0a9c6b1343 Mon Sep 17 00:00:00 2001 From: liujing Date: Tue, 16 Nov 2021 19:31:32 +0800 Subject: [PATCH] =?UTF-8?q?=E6=99=AE=E9=80=9A=E4=BA=91=E5=85=AC=E5=91=8A?= =?UTF-8?q?=E8=A7=86=E9=A2=91=E6=92=AD=E6=94=BE=E5=99=A8=E5=9C=86=E8=A7=92?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../widget/media/video/NoticeSimpleVideoPlayer.kt | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/core/mogo-core-res/src/main/java/com/mogo/eagle/core/widget/media/video/NoticeSimpleVideoPlayer.kt b/core/mogo-core-res/src/main/java/com/mogo/eagle/core/widget/media/video/NoticeSimpleVideoPlayer.kt index cdd061b7a1..a6b59d2c1b 100644 --- a/core/mogo-core-res/src/main/java/com/mogo/eagle/core/widget/media/video/NoticeSimpleVideoPlayer.kt +++ b/core/mogo-core-res/src/main/java/com/mogo/eagle/core/widget/media/video/NoticeSimpleVideoPlayer.kt @@ -1,6 +1,7 @@ package com.mogo.eagle.core.widget.media.video import android.content.Context +import android.os.Build import android.util.AttributeSet import android.util.Log import android.view.Surface @@ -213,5 +214,15 @@ class NoticeSimpleVideoPlayer : StandardGSYVideoPlayer { } } } + + override fun onSizeChanged(w: Int, h: Int, oldw: Int, oldh: Int) { + super.onSizeChanged(w, h, oldw, oldh) + if (!mIfCurrentIsFullscreen) { + if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) { + this.outlineProvider = TextureVideoViewOutlineProvider(40F) + this.clipToOutline = true + } + } + } }