Commit 7c3fe154 by olly Committed by Oliver Woodman

Add convenience getPlayer methods to UI components

Issue: #1895

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=135211179
parent 85d749d2
......@@ -128,6 +128,13 @@ public class PlaybackControlView extends FrameLayout {
}
/**
* Returns the player currently being controlled by this view, or null if no player is set.
*/
public ExoPlayer getPlayer() {
return player;
}
/**
* Sets the {@link ExoPlayer} to control.
*
* @param player the {@code ExoPlayer} to control.
......
......@@ -94,6 +94,13 @@ public final class SimpleExoPlayerView extends FrameLayout {
}
/**
* Returns the player currently set on this view, or null if no player is set.
*/
public SimpleExoPlayer getPlayer() {
return player;
}
/**
* Set the {@link SimpleExoPlayer} to use. The {@link SimpleExoPlayer#setTextOutput} and
* {@link SimpleExoPlayer#setVideoListener} method of the player will be called and previous
* assignments are overridden.
......
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