layout_base_video_view.xml 2.78 KB
<merge xmlns:android="http://schemas.android.com/apk/res/android">

    <com.google.android.exoplayer2.ui.AspectRatioFrameLayout
        android:id="@id/cnlive_content_frame"
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:layout_gravity="center">

        <!-- Video surface will be inserted as the first child of the content frame. -->

        <View
            android:id="@id/cnlive_shutter"
            android:layout_width="match_parent"
            android:layout_height="match_parent"
            android:background="#80000000" />

        <ImageView
            android:id="@id/cnlive_artwork"
            android:layout_width="match_parent"
            android:layout_height="match_parent"
            android:scaleType="fitXY" />

        <com.google.android.exoplayer2.ui.SubtitleView
            android:id="@id/cnlive_subtitles"
            android:layout_width="match_parent"
            android:layout_height="match_parent" />


    </com.google.android.exoplayer2.ui.AspectRatioFrameLayout>

    <FrameLayout
        android:id="@id/cnlive_ad_overlay"
        android:layout_width="match_parent"
        android:layout_height="match_parent" />

    <FrameLayout
        android:id="@id/cnlive_overlay"
        android:layout_width="match_parent"
        android:layout_height="match_parent" />

    <View
        android:id="@id/cnlive_controller_placeholder"
        android:layout_width="match_parent"
        android:layout_height="match_parent" />

    <ProgressBar
        android:id="@id/cnlive_buffering"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_gravity="center"
        android:indeterminate="true" />

    <LinearLayout
        android:id="@id/cnlive_error_message"
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:background="@color/black"
        android:clickable="true"
        android:gravity="center"
        android:orientation="vertical">

        <TextView
            android:id="@+id/tv_error_msg"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_marginBottom="20dp"
            android:text="@string/cnvideo_no_network"
            android:textColor="@color/white"
            android:textSize="16dp"
            android:textStyle="bold" />

        <Button
            android:id="@+id/btn_retry"
            android:layout_width="wrap_content"
            android:layout_height="35dp"
            android:background="@drawable/cnvideo_shape_error_btn_bg"
            android:text="点击重试"
            android:textColor="@color/white"
            android:textSize="15dp"
            android:textStyle="bold" />
    </LinearLayout>
</merge>