<?xml version="1.0" encoding="utf-8"?>
<merge xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:app="http://schemas.android.com/apk/res-auto"
    xmlns:tools="http://schemas.android.com/tools"
    tools:keep="@layout/exo_styled_player_view">

    <androidx.media3.ui.AspectRatioFrameLayout
        android:id="@id/exo_content_frame"
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:layout_gravity="center">

        <View
            android:id="@id/exo_shutter"
            android:layout_width="match_parent"
            android:layout_height="match_parent"
            android:background="@android:color/black" />

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

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

        <TextView
            android:id="@id/exo_error_message"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_gravity="center"
            android:layout_marginBottom="@dimen/exo_error_message_margin_bottom"
            android:background="@drawable/exo_rounded_rectangle"
            android:gravity="center"
            android:lineSpacingMultiplier="1.1"
            android:paddingLeft="@dimen/exo_error_message_text_padding_horizontal"
            android:paddingTop="@dimen/exo_error_message_text_padding_vertical"
            android:paddingRight="@dimen/exo_error_message_text_padding_horizontal"
            android:paddingBottom="@dimen/exo_error_message_text_padding_vertical"
            android:textColor="@color/exo_white"
            android:textSize="@dimen/exo_error_message_text_size" />
    </androidx.media3.ui.AspectRatioFrameLayout>

    <!-- SubtitleView placed OUTSIDE the AspectRatioFrameLayout so it fills
         the entire PlayerView area, including letterbox black bars -->
    <androidx.media3.ui.SubtitleView
        android:id="@id/exo_subtitles"
        android:layout_width="match_parent"
        android:layout_height="match_parent" />

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

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

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