Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

we cannot find the exo_play and exo_pause in custom_player_control.xml,Something inside this implementation is creating problem #1106

Closed
1 task
ai-developer63 opened this issue Feb 19, 2024 · 1 comment
Assignees
Labels

Comments

@ai-developer63
Copy link

Version

Media3 1.2.1

More version details

<LinearLayout
    android:layout_width="match_parent"
    android:layout_height="wrap_content"
    android:gravity="center"
    android:orientation="horizontal"
    android:paddingTop="4dp">



    <ImageButton
        android:id="@id/exo_rew"
        style="@style/ExoMediaButton.Rewind" />

    <ImageButton
        android:id="@id/exo_play"
        style="@style/ExoMediaButton.Play" />

    <ImageButton
        android:id="@id/exo_pause"
        style="@style/ExoMediaButton.Pause" />

    <ImageButton
        android:id="@id/exo_ffwd"
        style="@style/ExoMediaButton.FastForward" />

</LinearLayout>

<LinearLayout
    android:layout_width="match_parent"
    android:layout_height="wrap_content"
    android:layout_marginTop="4dp"
    android:gravity="center_vertical"
    android:orientation="horizontal">

    <TextView
        android:id="@id/exo_position"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:includeFontPadding="false"
        android:paddingLeft="4dp"
        android:paddingRight="4dp"
        android:textColor="#FFBEBEBE"
        android:textSize="14sp"
        android:textStyle="bold" />

    <androidx.media3.ui.DefaultTimeBar
        android:id="@id/exo_progress"
        android:layout_width="0dp"
        android:layout_height="26dp"
        android:layout_weight="1" />

    <TextView
        android:id="@id/exo_duration"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:includeFontPadding="false"
        android:paddingLeft="4dp"
        android:paddingRight="4dp"
        android:textColor="#FFBEBEBE"
        android:textSize="14sp"
        android:textStyle="bold" />

    <ImageView
        android:layout_marginStart="8dp"
        android:id="@+id/exo_playback_speed"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:src="@drawable/ic_baseline_speed_24">

    </ImageView>

    <TextView
        android:id="@+id/speed"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:text="1X"
        android:textColor="@color/white"
        android:textStyle="bold"
        android:visibility="gone">

    </TextView>

    <ImageButton
        android:id="@+id/exo_track_selection_view"
        android:layout_width="32dp"
        android:layout_height="32dp"
        android:layout_marginLeft="4dp"
        android:layout_weight="0"
        style="@style/ExoMediaButton.Play"
        android:src="@drawable/settings" />

    <ImageButton
        android:id="@+id/exo_fullscreen_button"
        android:layout_width="42dp"
        android:layout_height="42dp"
        android:layout_weight="0"
        android:layout_marginStart="0dp"
        android:layout_marginLeft="4dp"
        android:layout_marginRight="30dp"
        android:background="@null"
        android:src="@drawable/ic_baseline_fullscreen_24" />

</LinearLayout>
<androidx.media3.ui.PlayerView
    android:id="@+id/player_view"
    android:layout_width="match_parent"
    android:layout_height="wrap_content"
    android:keepScreenOn="true"
    app:show_timeout="0"
    app:use_controller="true"
    app:controller_layout_id="@layout/custom_player_control"/>
But in activity i am not able to get exoPlay = findViewById(R.id.exo_play); Solve this fast If you cannot give all service why you keep upgrading to give problem to us

Devices that reproduce the issue

IDE Error

Devices that do not reproduce the issue

No response

Reproducible in the demo app?

Yes

Reproduction steps

Just copy my code and you get the error

Expected result

Build the app

Actual result

cannot find symbol
exoPlay = findViewById(R.id.exo_play);
^
symbol: variable exo_play
location: class id

Media

https://firebasestorage.googleapis.com/v0/b/free-bsc-and-mobile.appspot.com/o/Coil_Final.mp4?alt=media&token=90473fd9-b5ce-4082-ac9d-e58219b5b584 Take it and must be functional ok

Bug Report

@icbaker
Copy link
Collaborator

icbaker commented Mar 5, 2024

I'm afraid that setting controller_layout_id is not a supported way to customize PlayerControlView. We removed the documentation about this in 1c37ad6 because it's hard/impossible to evolve the components while maintaining compatibility with all possible customizations that are done this way.

As such, I'm afraid we're limited in the amount of support we can offer here.

@icbaker icbaker closed this as not planned Won't fix, can't repro, duplicate, stale Mar 25, 2024
@androidx androidx locked and limited conversation to collaborators May 25, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

3 participants