<?xml version="1.0" encoding="utf-8"?>
<MotionScene xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:motion="http://schemas.android.com/apk/res-auto">

    <Transition
        android:id="@+id/yt_transition"
        motion:constraintSetEnd="@+id/end"
        motion:constraintSetStart="@id/start"
        motion:duration="10"
        motion:motionInterpolator="easeInOut">
        <KeyFrameSet>
            <KeyAttribute
                android:alpha="0"
                motion:framePosition="90"
                motion:motionTarget="@+id/close_imageView" />
            <KeyAttribute
                android:alpha="0"
                motion:framePosition="90"
                motion:motionTarget="@+id/play_imageView" />
            <KeyAttribute
                android:alpha="0"
                motion:framePosition="95"
                motion:motionTarget="@+id/title_textView" />
        </KeyFrameSet>
        <OnSwipe
            motion:dragDirection="dragDown"
            motion:dragScale="6"
            motion:maxAcceleration="40"
            motion:touchAnchorId="@+id/main_container"
            motion:touchAnchorSide="bottom" />
    </Transition>

    <ConstraintSet android:id="@+id/start">
        <Constraint
            android:id="@+id/player"
            android:layout_width="match_parent"
            android:layout_height="match_parent"
            motion:layout_constraintBottom_toBottomOf="@id/main_container"
            motion:layout_constraintStart_toStartOf="@id/main_container"
            motion:layout_constraintTop_toTopOf="@id/main_container" />
        <Constraint
            android:id="@+id/player"
            android:layout_width="match_parent"
            android:layout_height="match_parent"
            motion:layout_constraintBottom_toBottomOf="@id/main_container"
            motion:layout_constraintStart_toStartOf="@id/main_container"
            motion:layout_constraintTop_toTopOf="@id/main_container" />
        <Constraint
            android:id="@+id/player"
            android:layout_width="match_parent"
            android:layout_height="match_parent"
            motion:layout_constraintBottom_toBottomOf="@id/main_container"
            motion:layout_constraintStart_toStartOf="@id/main_container"
            motion:layout_constraintTop_toTopOf="@id/main_container" />
        <Constraint
            android:id="@+id/player"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            motion:layout_constraintBottom_toBottomOf="@id/main_container"
            motion:layout_constraintStart_toStartOf="@id/main_container"
            motion:layout_constraintTop_toTopOf="@id/main_container" />
        <Constraint
            android:id="@+id/player"
            android:layout_width="match_parent"
            android:layout_height="0dp"
            motion:layout_constraintBottom_toBottomOf="@id/main_container"
            motion:layout_constraintStart_toStartOf="@id/main_container"
            motion:layout_constraintTop_toTopOf="@id/main_container" />
        <Constraint android:id="@+id/doubleTapOverlay" />
    </ConstraintSet>

    <ConstraintSet android:id="@+id/end">
        <Constraint
            android:id="@+id/scrollView2"
            android:layout_width="0dp"
            android:layout_height="1dp"
            motion:layout_constraintBottom_toBottomOf="parent"
            motion:layout_constraintEnd_toEndOf="parent"
            motion:layout_constraintHorizontal_bias="0.5"
            motion:layout_constraintStart_toStartOf="parent"
            motion:layout_constraintTop_toBottomOf="@+id/main_container"
            motion:layout_constraintVertical_bias="1.0" />
        <Constraint
            android:id="@+id/main_container"
            android:layout_width="match_parent"
            android:layout_height="54dp"
            motion:layout_constraintBottom_toBottomOf="parent"
            motion:layout_constraintEnd_toEndOf="parent"
            motion:layout_constraintHorizontal_bias="0.5"
            motion:layout_constraintStart_toStartOf="parent"
            motion:layout_constraintTop_toTopOf="parent"
            motion:layout_constraintVertical_bias="1.0" />
        <Constraint
            android:id="@+id/player"
            android:layout_width="100dp"
            android:layout_height="0dp"
            motion:layout_constraintBottom_toBottomOf="@id/main_container"
            motion:layout_constraintStart_toStartOf="@id/main_container"
            motion:layout_constraintTop_toTopOf="@id/main_container" />
        <Constraint
            android:id="@+id/close_imageView"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_marginEnd="16dp"
            android:alpha="1"
            android:visibility="visible"
            motion:layout_constraintBottom_toBottomOf="@id/main_container"
            motion:layout_constraintEnd_toEndOf="@id/main_container"
            motion:layout_constraintTop_toTopOf="@id/main_container" />
        <Constraint
            android:id="@+id/play_imageView"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_marginEnd="24dp"
            android:alpha="1"
            android:visibility="visible"
            motion:layout_constraintBottom_toBottomOf="@+id/close_imageView"
            motion:layout_constraintEnd_toStartOf="@+id/close_imageView"
            motion:layout_constraintTop_toTopOf="@+id/close_imageView" />
        <Constraint
            android:id="@+id/title_textView"
            android:layout_width="0dp"
            android:layout_height="wrap_content"
            android:layout_marginStart="8dp"
            android:layout_marginEnd="12dp"
            android:alpha="1"
            android:visibility="visible"
            motion:layout_constraintBottom_toBottomOf="@+id/play_imageView"
            motion:layout_constraintEnd_toStartOf="@+id/play_imageView"
            motion:layout_constraintStart_toEndOf="@+id/player"
            motion:layout_constraintTop_toTopOf="@+id/play_imageView" />
    </ConstraintSet>
</MotionScene>