Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Increasing brightness of ExoPlayer 2 just like MxPlayer

I went through the entire documentation of ExoPlayer2, but couldn't find how to increase the brightness of exoplayer. I found a similar question

on github

My xml is as follows

<com.google.android.exoplayer2.ui.PlayerView
        android:id="@+id/exoplayer_view_activity_exo_player"
        android:layout_width="0dp"
        android:layout_height="0dp"
        android:focusable="true"
        app:layout_constraintBottom_toBottomOf="parent"
        app:layout_constraintEnd_toEndOf="parent"
        app:layout_constraintStart_toStartOf="parent"
        app:layout_constraintTop_toTopOf="parent"
        app:resize_mode="fill"
        app:show_timeout="0"
        app:use_controller="true" />

If I use SurfaceView instead how I am going to use the methods of exoplayer. I tried placing my exoplayer tag in surface view tag but my app crashed. Is there any other way to increase brightness of exoplayer. Please don't paste code to increase system brightness.

like image 253
Pritish Avatar asked May 25 '18 17:05

Pritish


1 Answers

You could modify the ExoPlayer2 library's internal SurfaceView at ExoPlayer/library/core/src/main/java/com/google/android/exoplayer2/ or the utils classes that control pixels and their "lightness" depending on how you want your brightness achieved.

You could also simply use the ExVidPlayer media playback library here. The library builds upon ExoPlayer2 and provides built in brightness control.

like image 64
Jantzilla Avatar answered Nov 13 '22 13:11

Jantzilla