<?xml version="1.0" encoding="utf-8"?>
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:background="#000000">

    <com.foxx.androidcast.ui.ZoomPanContainer
        android:id="@+id/zoom_container"
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:layout_gravity="center">

        <com.foxx.androidcast.ui.AspectRatioFrameLayout
            android:id="@+id/aspect_container"
            android:layout_width="match_parent"
            android:layout_height="match_parent"
            android:layout_gravity="center">

            <TextureView
                android:id="@+id/surface_playback"
                android:layout_width="match_parent"
                android:layout_height="match_parent"
                android:layout_gravity="center"
                android:keepScreenOn="true" />
        </com.foxx.androidcast.ui.AspectRatioFrameLayout>
    </com.foxx.androidcast.ui.ZoomPanContainer>

    <include
        layout="@layout/overlay_stream_awaiting"
        android:layout_width="match_parent"
        android:layout_height="match_parent" />

    <include
        layout="@layout/overlay_cast_diagnostics"
        android:layout_width="match_parent"
        android:layout_height="match_parent" />

    <ImageButton
        android:id="@+id/button_pip"
        android:layout_width="48dp"
        android:layout_height="48dp"
        android:layout_gravity="top|end"
        android:layout_margin="16dp"
        android:background="?attr/selectableItemBackgroundBorderless"
        android:contentDescription="@string/pip_enter"
        android:padding="8dp"
        android:src="@drawable/ic_picture_in_picture"
        android:visibility="gone" />
</FrameLayout>
