mirror of
https://github.com/samsonjs/media.git
synced 2026-04-03 10:55:48 +00:00
Add convenience getPlayer methods to UI components
Issue: #1895 ------------- Created by MOE: https://github.com/google/moe MOE_MIGRATED_REVID=135211179
This commit is contained in:
parent
85d749d2d5
commit
7c3fe15426
2 changed files with 14 additions and 0 deletions
|
|
@ -127,6 +127,13 @@ public class PlaybackControlView extends FrameLayout {
|
|||
updateAll();
|
||||
}
|
||||
|
||||
/**
|
||||
* 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.
|
||||
*
|
||||
|
|
|
|||
|
|
@ -93,6 +93,13 @@ public final class SimpleExoPlayerView extends FrameLayout {
|
|||
layout.addView(surfaceView, 0);
|
||||
}
|
||||
|
||||
/**
|
||||
* 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
|
||||
|
|
|
|||
Loading…
Reference in a new issue