像MxPlayer一样提高ExoPlayer 2的亮度

时间:2018-05-25 17:13:40

标签: android exoplayer exoplayer2.x

我浏览了ExoPlayer2的整个文档,但无法找到如何提高exoplayer的亮度。我发现了类似的问题

on github

我的xml如下

<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" />

如果我使用SurfaceView而不是我将如何使用exoplayer的方法。我尝试将我的exoplayer标记放在表面视图标记中,但我的应用程序崩溃了。有没有其他方法可以增加exoplayer的亮度。请不要粘贴代码以提高系统亮度。

1 个答案:

答案 0 :(得分:1)

您可以在ExoPlayer/library/core/src/main/java/com/google/android/exoplayer2/修改ExoPlayer2库的内部SurfaceView或修改像素及其“亮度”的utils类,具体取决于您希望亮度的实现方式。

您也可以使用ExVidPlayer媒体播放库here。该库建立在ExoPlayer2之上,并提供内置的亮度控制。