Allow stable API users to register PlayerView listeners
These listeners cover controller visibility and fullscreen button clicks. PiperOrigin-RevId: 445420757
This commit is contained in:
parent
5784068838
commit
8323c69ed2
@ -172,7 +172,6 @@ import org.checkerframework.checker.nullness.qual.RequiresNonNull;
|
|||||||
public class PlayerView extends FrameLayout implements AdViewProvider {
|
public class PlayerView extends FrameLayout implements AdViewProvider {
|
||||||
|
|
||||||
/** Listener to be notified about changes of the visibility of the UI controls. */
|
/** Listener to be notified about changes of the visibility of the UI controls. */
|
||||||
@UnstableApi
|
|
||||||
public interface ControllerVisibilityListener {
|
public interface ControllerVisibilityListener {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -187,7 +186,6 @@ public class PlayerView extends FrameLayout implements AdViewProvider {
|
|||||||
* Listener invoked when the fullscreen button is clicked. The implementation is responsible for
|
* Listener invoked when the fullscreen button is clicked. The implementation is responsible for
|
||||||
* changing the UI layout.
|
* changing the UI layout.
|
||||||
*/
|
*/
|
||||||
@UnstableApi
|
|
||||||
public interface FullscreenButtonClickListener {
|
public interface FullscreenButtonClickListener {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -896,7 +894,6 @@ public class PlayerView extends FrameLayout implements AdViewProvider {
|
|||||||
* current listener.
|
* current listener.
|
||||||
*/
|
*/
|
||||||
@SuppressWarnings("deprecation") // Clearing the legacy listener.
|
@SuppressWarnings("deprecation") // Clearing the legacy listener.
|
||||||
@UnstableApi
|
|
||||||
public void setControllerVisibilityListener(@Nullable ControllerVisibilityListener listener) {
|
public void setControllerVisibilityListener(@Nullable ControllerVisibilityListener listener) {
|
||||||
this.controllerVisibilityListener = listener;
|
this.controllerVisibilityListener = listener;
|
||||||
setControllerVisibilityListener((PlayerControlView.VisibilityListener) null);
|
setControllerVisibilityListener((PlayerControlView.VisibilityListener) null);
|
||||||
@ -940,7 +937,6 @@ public class PlayerView extends FrameLayout implements AdViewProvider {
|
|||||||
* remove the current listener and hide the fullscreen button.
|
* remove the current listener and hide the fullscreen button.
|
||||||
*/
|
*/
|
||||||
@SuppressWarnings("deprecation") // Calling the deprecated method on PlayerControlView for now.
|
@SuppressWarnings("deprecation") // Calling the deprecated method on PlayerControlView for now.
|
||||||
@UnstableApi
|
|
||||||
public void setFullscreenButtonClickListener(@Nullable FullscreenButtonClickListener listener) {
|
public void setFullscreenButtonClickListener(@Nullable FullscreenButtonClickListener listener) {
|
||||||
Assertions.checkStateNotNull(controller);
|
Assertions.checkStateNotNull(controller);
|
||||||
this.fullscreenButtonClickListener = listener;
|
this.fullscreenButtonClickListener = listener;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user