From fd11615922731700576c78b6f9679f62c328e129 Mon Sep 17 00:00:00 2001 From: liujing Date: Tue, 20 Oct 2020 16:30:12 +0800 Subject: [PATCH] =?UTF-8?q?=E6=92=AD=E6=94=BE=E5=99=A8=E5=A4=A7=E5=B0=8F?= =?UTF-8?q?=E8=87=AA=E5=AE=9A=E4=B9=89!=3D=E8=A7=86=E9=A2=91size=E5=A4=A7?= =?UTF-8?q?=E5=B0=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/com/mogo/module/v2x/view/TextureVideoView.java | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/modules/mogo-module-v2x/src/main/java/com/mogo/module/v2x/view/TextureVideoView.java b/modules/mogo-module-v2x/src/main/java/com/mogo/module/v2x/view/TextureVideoView.java index 89d30e4a5a..25d6690a3c 100644 --- a/modules/mogo-module-v2x/src/main/java/com/mogo/module/v2x/view/TextureVideoView.java +++ b/modules/mogo-module-v2x/src/main/java/com/mogo/module/v2x/view/TextureVideoView.java @@ -394,8 +394,11 @@ public class TextureVideoView extends TextureView mVideoWidth = mp.getVideoWidth(); mVideoHeight = mp.getVideoHeight(); if (mVideoWidth != 0 && mVideoHeight != 0) { - getSurfaceTexture().setDefaultBufferSize(mVideoWidth, mVideoHeight); - requestLayout(); + /* + * 播放器大小等于获取的视频尺寸!!!!!!!!!!!!!!!!! + * */ +// getSurfaceTexture().setDefaultBufferSize(mVideoWidth, mVideoHeight); +// requestLayout(); } } }; @@ -421,7 +424,7 @@ public class TextureVideoView extends TextureView } if (mVideoWidth != 0 && mVideoHeight != 0) { //Log.i("@@@@", "video size: " + mVideoWidth +"/"+ mVideoHeight); - getSurfaceTexture().setDefaultBufferSize(mVideoWidth, mVideoHeight); +// getSurfaceTexture().setDefaultBufferSize(mVideoWidth, mVideoHeight);/*播放器大小等于获取的视频尺寸!!!!!!!!!!!!!!!!!*/ // We won't get a "surface changed" callback if the surface is already the right size, so // start the video here instead of in the callback. if (mTargetState == STATE_PLAYING) {