In my case, I need to change color of scrubber (thumb) when it is focused.
So I created a drawable like this
bg_progressbar_play_video
<?xml version="1.0" encoding="utf-8"?>
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<item android:state_focused="true"
android:drawable="@drawable/bg_progressbar_play_video_focused"/>
<item android:drawable="@drawable/bg_progressbar_play_video_normal"/>
</selector>
And here are bg_progressbar_play_video_normal
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="oval">
<size
android:width="14dp"
android:height="14dp" />/
<solid android:color="#ffffff" />
</shape>
and bg_progressbar_play_video_focused
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="oval"
>
<size android:height="14dp" android:width="14dp"/>/
<solid android:color="@android:color/holo_red_dark"/>
</shape>
and here is way I added the drawable to scrubber.
<com.google.android.exoplayer2.ui.PlayerView
android:id="@+id/videoPlayerView"
android:layout_width="0dp"
android:layout_height="0dp"
android:background="#000000"
android:focusable="true"
app:played_color="@android:color/holo_red_dark"
app:scrubber_drawable="@drawable/bg_progressbar_play_video"
app:layout_constraintDimensionRatio="16:9"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
If you just need to change the color and enabled size of scrubber (thumb), you can use these below attributes:
app:scrubber_enabled_size="24dp"
app:scrubber_color="@android:color/holo_red_dark"
More informations about these attributes that you can customize, please read in here: https://exoplayer.dev/doc/reference/com/google/android/exoplayer2/ui/DefaultTimeBar.html