<?xml version="1.0" encoding="utf-8"?>
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:app="http://schemas.android.com/apk/res-auto"
    android:id="@+id/now_playing_media_controller_layout"
    android:layout_width="match_parent"
    android:layout_height="match_parent">

    <androidx.constraintlayout.widget.Guideline
        android:id="@+id/vertical_guideline"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:orientation="vertical"
        app:layout_constraintGuide_percent="0.45" />

    <androidx.constraintlayout.widget.ConstraintLayout
        android:id="@+id/player_media_quality_sector"
        android:layout_width="0dp"
        android:layout_height="wrap_content"
        android:layout_marginVertical="8dp"
        android:gravity="center"
        android:orientation="horizontal"
        app:layout_constraintEnd_toEndOf="parent"
        app:layout_constraintStart_toEndOf="@+id/vertical_guideline"
        app:layout_constraintTop_toTopOf="parent">

        <com.google.android.material.chip.Chip
            android:id="@+id/player_media_extension"
            style="@style/Widget.Material3.Chip.Suggestion"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:checked="true"
            android:clickable="false"
            android:text="Unknown"
            app:chipStrokeWidth="0dp"
            app:layout_constraintTop_toTopOf="parent"
            app:layout_constraintBottom_toBottomOf="parent"
            app:layout_constraintEnd_toStartOf="@id/player_media_bitrate"
            app:layout_constraintStart_toStartOf="parent"
            app:layout_constraintHorizontal_chainStyle="packed"/>

        <TextView
            android:id="@+id/player_media_bitrate"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_marginStart="8dp"
            app:layout_constraintTop_toTopOf="@id/player_media_extension"
            app:layout_constraintBottom_toBottomOf="@id/player_media_extension"
            app:layout_constraintStart_toEndOf="@id/player_media_extension"
            app:layout_constraintEnd_toEndOf="parent"/>

        <ImageButton
            android:id="@+id/player_info_track"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:padding="16dp"
            android:layout_marginEnd="8dp"
            android:background="?attr/selectableItemBackgroundBorderless"
            android:scaleType="fitCenter"
            app:layout_constraintEnd_toEndOf="parent"
            app:layout_constraintTop_toTopOf="@id/player_media_extension"
            app:layout_constraintBottom_toBottomOf="@id/player_media_extension"
            app:srcCompat="@drawable/ic_info_stream"
            app:tint="?attr/colorOnPrimaryContainer" />

    </androidx.constraintlayout.widget.ConstraintLayout>

    <androidx.viewpager2.widget.ViewPager2
        android:id="@+id/player_media_cover_view_pager"
        android:layout_width="0dp"
        android:layout_height="0dp"
        android:layout_margin="12dp"
        android:clipToPadding="false"
        app:layout_constraintBottom_toBottomOf="parent"
        app:layout_constraintEnd_toStartOf="@+id/vertical_guideline"
        app:layout_constraintStart_toStartOf="parent"
        app:layout_constraintTop_toTopOf="parent" />

    <LinearLayout
        android:id="@+id/rating_container"
        android:layout_width="0dp"
        android:layout_height="wrap_content"
        android:layout_marginTop="0dp"
        android:orientation="horizontal"
        android:gravity="center"
        android:scaleX="0.8"
        android:scaleY="0.8"
        app:layout_constraintEnd_toEndOf="parent"
        app:layout_constraintStart_toEndOf="@+id/vertical_guideline"
        app:layout_constraintTop_toBottomOf="@+id/player_media_quality_sector">

        <RatingBar
            android:id="@+id/song_rating_bar"
            style="?android:attr/ratingBarStyleIndicator"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:numStars="5"
            android:stepSize="1"
            android:rating="0"
            android:isIndicator="false" />

        <TextView
            android:id="@+id/rating_text"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_marginStart="8dp"
            android:textSize="12sp"
            android:textColor="?attr/colorOnSurfaceVariant"
            android:text=""/>
    </LinearLayout>

    <TextView
        android:id="@+id/player_media_title_label"
        style="@style/HeadlineLarge"
        android:layout_width="0dp"
        android:layout_height="wrap_content"
        android:layout_marginStart="24dp"
        android:layout_marginEnd="24dp"
        android:ellipsize="marquee"
        android:singleLine="true"
        android:text="@string/label_placeholder"
        app:layout_constraintVertical_chainStyle="packed"
        app:layout_constraintBottom_toTopOf="@+id/player_artist_name_label"
        app:layout_constraintEnd_toStartOf="@+id/button_favorite"
        app:layout_constraintStart_toEndOf="@+id/vertical_guideline"
        app:layout_constraintTop_toBottomOf="@+id/player_media_quality_sector" />

    <TextView
        android:id="@+id/player_artist_name_label"
        style="@style/TitleMedium"
        android:layout_width="0dp"
        android:layout_height="wrap_content"
        android:layout_marginStart="24dp"
        android:layout_marginEnd="24dp"
        android:ellipsize="marquee"
        android:singleLine="true"
        android:text="@string/label_placeholder"
        app:layout_constraintEnd_toStartOf="@+id/button_favorite"
        app:layout_constraintStart_toEndOf="@+id/vertical_guideline"
        app:layout_constraintTop_toBottomOf="@+id/player_media_title_label"
        app:layout_constraintBottom_toTopOf="@id/exo_progress"/>

    <ToggleButton
        android:id="@+id/button_favorite"
        android:layout_width="26dp"
        android:layout_height="26dp"
        android:layout_marginEnd="24dp"
        android:background="@drawable/button_favorite_selector"
        android:checked="false"
        android:text=""
        android:textOff=""
        android:textOn=""
        app:layout_constraintBottom_toBottomOf="@+id/player_media_title_label"
        app:layout_constraintEnd_toEndOf="parent"
        app:layout_constraintTop_toTopOf="@+id/player_media_title_label" />

    <TextView
        android:id="@+id/exo_position"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_gravity="center"
        android:layout_marginStart="24dp"
        android:paddingBottom="4dp"
        android:text="@string/label_placeholder"
        android:textColor="@color/titleTextColor"
        android:textSize="12sp"
        app:layout_constraintStart_toEndOf="@+id/vertical_guideline"
        app:layout_constraintTop_toBottomOf="@+id/exo_progress" />

    <androidx.media3.ui.DefaultTimeBar
        android:id="@id/exo_progress"
        android:layout_width="0dp"
        android:layout_height="wrap_content"
        android:layout_marginStart="16dp"
        android:layout_marginTop="20dp"
        android:layout_marginEnd="16dp"
        app:bar_height="2dp"
        app:buffered_color="?attr/colorOnSecondaryContainer"
        app:layout_constraintEnd_toEndOf="parent"
        app:layout_constraintStart_toEndOf="@+id/vertical_guideline"
        app:layout_constraintTop_toBottomOf="@+id/player_artist_name_label"
        app:layout_constraintBottom_toTopOf="@+id/player_play_pause_placeholder_view"
        app:played_color="?attr/colorOnPrimaryContainer"
        app:scrubber_color="?attr/colorOnPrimaryContainer"
        app:unplayed_color="?attr/colorPrimaryContainer" />

    <TextView
        android:id="@+id/exo_duration"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_gravity="center"
        android:layout_marginEnd="24dp"
        android:paddingBottom="4dp"
        android:text="@string/label_placeholder"
        android:textColor="@color/titleTextColor"
        android:textSize="12sp"
        app:layout_constraintEnd_toEndOf="parent"
        app:layout_constraintTop_toBottomOf="@+id/exo_progress" />

    <View
        android:id="@+id/placeholder_view_left"
        android:layout_width="32dp"
        android:layout_height="32dp"
        android:layout_marginStart="24dp"
        app:layout_constraintBottom_toBottomOf="@+id/placeholder_view_middle_left"
        app:layout_constraintEnd_toStartOf="@+id/placeholder_view_middle_left"
        app:layout_constraintStart_toEndOf="@+id/vertical_guideline"
        app:layout_constraintTop_toTopOf="@+id/placeholder_view_middle_left" />

    <View
        android:id="@+id/placeholder_view_middle_left"
        android:layout_width="42dp"
        android:layout_height="42dp"
        app:layout_constraintBottom_toBottomOf="@+id/player_play_pause_placeholder_view"
        app:layout_constraintEnd_toStartOf="@+id/player_play_pause_placeholder_view"
        app:layout_constraintStart_toEndOf="@id/placeholder_view_left"
        app:layout_constraintTop_toTopOf="@+id/player_play_pause_placeholder_view" />

    <View
        android:id="@+id/player_play_pause_placeholder_view"
        android:layout_width="70dp"
        android:layout_height="70dp"
        android:layout_marginTop="36dp"
        app:layout_constraintBottom_toTopOf="@+id/player_quick_action_view"
        app:layout_constraintEnd_toEndOf="parent"
        app:layout_constraintStart_toEndOf="@+id/vertical_guideline"
        app:layout_constraintTop_toBottomOf="@+id/exo_progress"/>

    <View
        android:id="@+id/placeholder_view_middle_right"
        android:layout_width="42dp"
        android:layout_height="42dp"
        app:layout_constraintBottom_toBottomOf="@+id/player_play_pause_placeholder_view"
        app:layout_constraintEnd_toStartOf="@id/placeholder_view_right"
        app:layout_constraintStart_toEndOf="@+id/player_play_pause_placeholder_view"
        app:layout_constraintTop_toTopOf="@+id/player_play_pause_placeholder_view" />

    <View
        android:id="@+id/placeholder_view_right"
        android:layout_width="32dp"
        android:layout_height="32dp"
        android:layout_marginEnd="24dp"
        app:layout_constraintBottom_toBottomOf="@+id/placeholder_view_middle_right"
        app:layout_constraintEnd_toEndOf="parent"
        app:layout_constraintStart_toEndOf="@+id/placeholder_view_middle_right"
        app:layout_constraintTop_toTopOf="@+id/placeholder_view_middle_right" />

    <Button
        android:id="@+id/player_playback_speed_button"
        style="@style/Widget.Material3.Button.TextButton"
        android:layout_width="64dp"
        android:layout_height="64dp"
        android:layout_marginStart="24dp"
        android:insetLeft="0dp"
        android:insetTop="0dp"
        android:insetRight="0dp"
        android:insetBottom="0dp"
        app:cornerRadius="30dp"
        app:layout_constraintBottom_toBottomOf="@+id/placeholder_view_middle_left"
        app:layout_constraintEnd_toStartOf="@+id/placeholder_view_middle_left"
        app:layout_constraintStart_toEndOf="@+id/vertical_guideline"
        app:layout_constraintTop_toTopOf="@+id/placeholder_view_middle_left"
        app:tint="?attr/colorOnPrimaryContainer" />

    <ImageButton
        android:id="@+id/exo_shuffle"
        android:layout_width="32dp"
        android:layout_height="32dp"
        android:layout_marginStart="24dp"
        android:background="?attr/selectableItemBackgroundBorderless"
        android:scaleType="fitCenter"
        app:layout_constraintBottom_toBottomOf="@+id/placeholder_view_middle_left"
        app:layout_constraintEnd_toStartOf="@+id/placeholder_view_middle_left"
        app:layout_constraintStart_toEndOf="@+id/vertical_guideline"
        app:layout_constraintTop_toTopOf="@+id/placeholder_view_middle_left"
        app:srcCompat="@drawable/ic_shuffle"
        app:tint="?attr/colorOnPrimaryContainer" />

    <ImageButton
        android:id="@+id/exo_rew"
        android:layout_width="42dp"
        android:layout_height="42dp"
        android:background="?attr/selectableItemBackgroundBorderless"
        android:scaleType="fitCenter"
        android:src="@drawable/ic_replay"
        app:layout_constraintBottom_toBottomOf="@+id/player_play_pause_placeholder_view"
        app:layout_constraintEnd_toStartOf="@+id/player_play_pause_placeholder_view"
        app:layout_constraintStart_toEndOf="@id/placeholder_view_left"
        app:layout_constraintTop_toTopOf="@+id/player_play_pause_placeholder_view"
        app:tint="?attr/colorOnPrimaryContainer" />

    <ImageButton
        android:id="@+id/exo_prev"
        android:layout_width="42dp"
        android:layout_height="42dp"
        android:background="?attr/selectableItemBackgroundBorderless"
        android:scaleType="fitCenter"
        app:layout_constraintBottom_toBottomOf="@+id/player_play_pause_placeholder_view"
        app:layout_constraintEnd_toStartOf="@+id/player_play_pause_placeholder_view"
        app:layout_constraintStart_toEndOf="@id/placeholder_view_left"
        app:layout_constraintTop_toTopOf="@+id/player_play_pause_placeholder_view"
        app:srcCompat="@drawable/ic_skip_previous"
        app:tint="?attr/colorOnPrimaryContainer" />

    <ImageButton
        android:id="@id/exo_play_pause"
        style="@style/ExoStyledControls.Button.Center.PlayPause"
        android:layout_width="80dp"
        android:layout_height="80dp"
        app:layout_constraintTop_toTopOf="@+id/player_play_pause_placeholder_view"
        app:layout_constraintEnd_toEndOf="@+id/player_play_pause_placeholder_view"
        app:layout_constraintStart_toStartOf="@+id/player_play_pause_placeholder_view"
        app:layout_constraintBottom_toBottomOf="@+id/player_play_pause_placeholder_view"
        app:tint="?attr/colorOnPrimaryContainer" />

    <ImageButton
        android:id="@+id/exo_next"
        android:layout_width="42dp"
        android:layout_height="42dp"
        android:background="?attr/selectableItemBackgroundBorderless"
        android:scaleType="fitCenter"
        app:layout_constraintBottom_toBottomOf="@+id/player_play_pause_placeholder_view"
        app:layout_constraintEnd_toStartOf="@id/placeholder_view_right"
        app:layout_constraintStart_toEndOf="@+id/player_play_pause_placeholder_view"
        app:layout_constraintTop_toTopOf="@+id/player_play_pause_placeholder_view"
        app:srcCompat="@drawable/ic_skip_next"
        app:tint="?attr/colorOnPrimaryContainer" />

    <ImageButton
        android:id="@+id/exo_ffwd"
        android:layout_width="42dp"
        android:layout_height="42dp"
        android:background="?attr/selectableItemBackgroundBorderless"
        android:scaleType="fitCenter"
        app:layout_constraintBottom_toBottomOf="@+id/player_play_pause_placeholder_view"
        app:layout_constraintEnd_toStartOf="@id/placeholder_view_right"
        app:layout_constraintStart_toEndOf="@+id/player_play_pause_placeholder_view"
        app:layout_constraintTop_toTopOf="@+id/player_play_pause_placeholder_view"
        app:srcCompat="@drawable/ic_forward"
        app:tint="?attr/colorOnPrimaryContainer" />

    <ImageButton
        android:id="@+id/exo_repeat_toggle"
        android:layout_width="32dp"
        android:layout_height="32dp"
        android:layout_marginEnd="24dp"
        android:background="?attr/selectableItemBackgroundBorderless"
        android:scaleType="fitCenter"
        app:layout_constraintBottom_toBottomOf="@+id/placeholder_view_middle_right"
        app:layout_constraintEnd_toEndOf="parent"
        app:layout_constraintStart_toEndOf="@+id/placeholder_view_middle_right"
        app:layout_constraintTop_toTopOf="@+id/placeholder_view_middle_right"
        app:srcCompat="@drawable/ic_repeat"
        app:tint="?attr/colorOnPrimaryContainer" />

    <ToggleButton
        android:id="@+id/player_skip_silence_toggle_button"
        android:layout_width="24dp"
        android:layout_height="24dp"
        android:layout_marginEnd="24dp"
        android:background="@drawable/button_skip_silence_selector"
        android:text=""
        android:textOff=""
        android:textOn=""
        app:layout_constraintBottom_toBottomOf="@+id/placeholder_view_middle_right"
        app:layout_constraintEnd_toEndOf="parent"
        app:layout_constraintStart_toEndOf="@+id/placeholder_view_middle_right"
        app:layout_constraintTop_toTopOf="@+id/placeholder_view_middle_right"
        app:tint="?attr/colorOnPrimaryContainer" />

    <androidx.constraintlayout.widget.ConstraintLayout
        android:id="@+id/player_quick_action_view"
        android:layout_width="0dp"
        android:layout_height="@dimen/now_playing_bottom_peek_height"
        app:layout_constraintBottom_toBottomOf="parent"
        app:layout_constraintStart_toEndOf="@+id/vertical_guideline"
        app:layout_constraintEnd_toEndOf="parent"
        android:visibility="gone">

        <ImageButton
            android:id="@+id/player_open_queue_button"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:padding="16dp"
            android:background="?attr/selectableItemBackgroundBorderless"
            app:layout_constraintStart_toEndOf="@+id/player_open_equalizer_button"
            app:layout_constraintEnd_toEndOf="parent"
            app:layout_constraintTop_toTopOf="parent"
            app:layout_constraintBottom_toBottomOf="parent"
            app:srcCompat="@drawable/ic_queue" />

        <ImageButton
            android:id="@+id/player_open_equalizer_button"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:padding="16dp"
            android:background="?attr/selectableItemBackgroundBorderless"
            app:layout_constraintStart_toStartOf="parent"
            app:layout_constraintEnd_toStartOf="@+id/player_open_queue_button"
            app:layout_constraintTop_toTopOf="parent"
            app:layout_constraintBottom_toBottomOf="parent"
            app:srcCompat="@drawable/ic_eq" />

    </androidx.constraintlayout.widget.ConstraintLayout>
</androidx.constraintlayout.widget.ConstraintLayout>