播放器大小自定义!=视频size大小
This commit is contained in:
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user