Commit 91a61cec by huangdarwin Committed by Marc Baechinger

Demo: Hide player controls by default.

Player controls are somewhat distracting when showing the difference between the
input and output video, as they obscure and darken the video players.

PiperOrigin-RevId: 480597804
parent 6c59f9ec
...@@ -307,7 +307,7 @@ public final class TransformerActivity extends AppCompatActivity { ...@@ -307,7 +307,7 @@ public final class TransformerActivity extends AppCompatActivity {
.build(); .build();
} }
// Create a cache file, resetting it if it already exists. /** Creates a cache file, resetting it if it already exists. */
private File createExternalCacheFile(String fileName) throws IOException { private File createExternalCacheFile(String fileName) throws IOException {
File file = new File(getExternalCacheDir(), fileName); File file = new File(getExternalCacheDir(), fileName);
if (file.exists() && !file.delete()) { if (file.exists() && !file.delete()) {
...@@ -505,12 +505,14 @@ public final class TransformerActivity extends AppCompatActivity { ...@@ -505,12 +505,14 @@ public final class TransformerActivity extends AppCompatActivity {
ExoPlayer inputPlayer = new ExoPlayer.Builder(/* context= */ this).build(); ExoPlayer inputPlayer = new ExoPlayer.Builder(/* context= */ this).build();
inputPlayerView.setPlayer(inputPlayer); inputPlayerView.setPlayer(inputPlayer);
inputPlayerView.setControllerAutoShow(false);
inputPlayer.setMediaItem(inputMediaItem); inputPlayer.setMediaItem(inputMediaItem);
inputPlayer.prepare(); inputPlayer.prepare();
this.inputPlayer = inputPlayer; this.inputPlayer = inputPlayer;
ExoPlayer outputPlayer = new ExoPlayer.Builder(/* context= */ this).build(); ExoPlayer outputPlayer = new ExoPlayer.Builder(/* context= */ this).build();
outputPlayerView.setPlayer(outputPlayer); outputPlayerView.setPlayer(outputPlayer);
outputPlayerView.setControllerAutoShow(false);
outputPlayer.setMediaItem(outputMediaItem); outputPlayer.setMediaItem(outputMediaItem);
outputPlayer.prepare(); outputPlayer.prepare();
this.outputPlayer = outputPlayer; this.outputPlayer = outputPlayer;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment