
Images are rendered into an ImageView (on top of the video shutter). The image view is set to the images emitted by ExoPlayer's ImageOutput and cleared when there is no longer a selected image track. In order to keep the existing behavior of video tracks to only clear the old output once the new first frame is rendered (avoiding short periods of black between playlist items), we have to reorder this code slightly to make it work for video and images. Both are treated in the same way. If both are enabled, video takes precedence. As the UI module only depends on the common module, we can't direcly add the ImageOutput to ExoPlayer. This is done via reflection if the provided Player is an ExoPlayer. #cherrypick PiperOrigin-RevId: 643320666
47 lines
2.4 KiB
Plaintext
47 lines
2.4 KiB
Plaintext
# Proguard rules specific to the UI module.
|
|
|
|
# Constructor method and classes accessed via reflection in PlayerView
|
|
-dontnote androidx.media3.exoplayer.video.spherical.SphericalGLSurfaceView
|
|
-keepclassmembers class androidx.media3.exoplayer.video.spherical.SphericalGLSurfaceView {
|
|
<init>(android.content.Context);
|
|
}
|
|
-dontnote androidx.media3.exoplayer.video.VideoDecoderGLSurfaceView
|
|
-keepclassmembers class androidx.media3.exoplayer.video.VideoDecoderGLSurfaceView {
|
|
<init>(android.content.Context);
|
|
}
|
|
-keepnames class androidx.media3.exoplayer.ExoPlayer {}
|
|
-keepclassmembers class androidx.media3.exoplayer.ExoPlayer {
|
|
void setImageOutput(androidx.media3.exoplayer.image.ImageOutput);
|
|
}
|
|
-keepclasseswithmembers class androidx.media3.exoplayer.image.ImageOutput {
|
|
void onImageAvailable(long, android.graphics.Bitmap);
|
|
}
|
|
|
|
# Constructor method accessed via reflection in TrackSelectionDialogBuilder
|
|
-dontnote androidx.appcompat.app.AlertDialog.Builder
|
|
-keepclassmembers class androidx.appcompat.app.AlertDialog$Builder {
|
|
<init>(android.content.Context, int);
|
|
public android.content.Context getContext();
|
|
public androidx.appcompat.app.AlertDialog$Builder setTitle(java.lang.CharSequence);
|
|
public androidx.appcompat.app.AlertDialog$Builder setView(android.view.View);
|
|
public androidx.appcompat.app.AlertDialog$Builder setPositiveButton(int, android.content.DialogInterface$OnClickListener);
|
|
public androidx.appcompat.app.AlertDialog$Builder setNegativeButton(int, android.content.DialogInterface$OnClickListener);
|
|
public androidx.appcompat.app.AlertDialog create();
|
|
}
|
|
# Equivalent methods needed when the library is de-jetified.
|
|
-dontnote android.support.v7.app.AlertDialog.Builder
|
|
-keepclassmembers class android.support.v7.app.AlertDialog$Builder {
|
|
<init>(android.content.Context, int);
|
|
public android.content.Context getContext();
|
|
public android.support.v7.app.AlertDialog$Builder setTitle(java.lang.CharSequence);
|
|
public android.support.v7.app.AlertDialog$Builder setView(android.view.View);
|
|
public android.support.v7.app.AlertDialog$Builder setPositiveButton(int, android.content.DialogInterface$OnClickListener);
|
|
public android.support.v7.app.AlertDialog$Builder setNegativeButton(int, android.content.DialogInterface$OnClickListener);
|
|
public android.support.v7.app.AlertDialog create();
|
|
}
|
|
|
|
# Don't warn about checkerframework and Kotlin annotations
|
|
-dontwarn org.checkerframework.**
|
|
-dontwarn kotlin.annotations.jvm.**
|
|
-dontwarn javax.annotation.**
|