我用的是JCVideoplayer来播放视频源,我重写onMeasure发现视频窗口没了。现在我用的
是scaleX 强行把X轴变拉长,但是这样会造成其他控件变形
private JCVideoPlayerStandard jcVideoPlayerStandard;
jcVideoPlayerStandard = findViewById(R.id.video_player);
jcVideoPlayerStandard.setUp(mediaModel.getVideoUrl()
, JCVideoPlayerStandard.SCREEN_WINDOW_FULLSCREEN, mediaModel.getTitle());
jcVideoPlayerStandard.startPlayLocic();
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent">
<fm.jiecao.jcvideoplayer_lib.JCVideoPlayerStandard
android:id="@+id/video_player"
android:layout_width="match_parent"
android:layout_height="match_parent"
/>
<TextView
android:id="@+id/tv_channel"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentRight="true"
android:layout_margin="40dp"
android:text="15"
android:textColor="@color/detail_background"
android:textSize="60sp" />