Skip to content

PlayerUIController

Pierfrancesco Soffritti edited this page Oct 16, 2017 · 10 revisions

The PlayerUIController is responsible for controlling the UI of the player. You can see its contract here.

Live videos

If you want to play live videos you must setup the UI accordingly by calling this method

PlayerUIController.enableLiveVideoIndicator(boolean);

Unfortunately there is no way for the player to recognize if it is playing a live video or not, therefore is up to the developer to change the UI accordingly.

Custom actions

If you want you can set custom actions on the right and left side of the Play/Pause button of the player

PlayerUIController.setCustomAction1(Drawable icon, OnClickListener listener );
PlayerUIController.setCustomAction2(Drawable icon, OnClickListener listener );
PlayerUIController.showCustomAction1(boolean show);
PlayerUIController.showCustomAction2(boolean show);

by default if you set a custom action with a null listener the icon won't be visible.

You can also change the behavior of the full screen button, in case your app requires custom logic to enter full screen

PlayerUIController.setCustomFullScreenButtonListener(OnClickListener);

Clone this wiki locally