public class APSMediaPlayerButtonOverlayController extends APSMediaPlayerOverlayController implements APSMediaPlayerTrackingEventListener
APSMediaPlayerButtonOverlayController allows placing a transparent overlay in a specific area of the player surface, that can trigger the launch of a specific URL. The APSMediaPlayer instance will query the actionDelegate object to interpret and launch the specified URL. If the actionDelegate cannot respond to the URL, and the URL has a web scheme (http or https), it will be launched automatically in the in-app web browser.To create an APSMediaOverlay of button type:
type property to APSButtonOverlayset the overlay object’s properties property to a HashMap that can have the following keys and values:
String representing the URL that should be launched when the overlay is tapped.ArrayList of String objects that will be tracked by the player when the overlay is tapped (see [APSMediaPlayer track:forEvent:type:]). Note that the kAPSButtonOverlayClickthrough key must also be set for tracking to happen| Modifier and Type | Field and Description |
|---|---|
static java.lang.String |
APSButtonOverlay |
static java.lang.String |
kAPSButtonOverlayClickthrough |
static java.lang.String |
kAPSButtonOverlayClicktracking |
static java.lang.String |
kAPSButtonOverlayWebviewDismissAction |
overlay| Constructor and Description |
|---|
APSMediaPlayerButtonOverlayController() |
| Modifier and Type | Method and Description |
|---|---|
void |
addViewToContainer(ViewGroup viewGroup) |
float |
getAlpha() |
View |
getView() |
void |
hideOverlay() |
void |
load(Context context) |
void |
onDestroy() |
void |
onTrackingEventReceived(APSMediaTrackingEvents.MediaEventType type,
Bundle additionalInfo)
Called when a player emits an event.
|
java.lang.String |
type() |
refreshpublic static final java.lang.String kAPSButtonOverlayClickthrough
public static final java.lang.String kAPSButtonOverlayClicktracking
public static final java.lang.String APSButtonOverlay
public static final java.lang.String kAPSButtonOverlayWebviewDismissAction
public APSMediaPlayerButtonOverlayController()
public void load(Context context)
load in class APSMediaPlayerOverlayControllerpublic void addViewToContainer(ViewGroup viewGroup)
addViewToContainer in class APSMediaPlayerOverlayControllerpublic View getView()
getView in class APSMediaPlayerOverlayControllerpublic float getAlpha()
getAlpha in class APSMediaPlayerOverlayControllerpublic void hideOverlay()
hideOverlay in class APSMediaPlayerOverlayControllerpublic void onDestroy()
public void onTrackingEventReceived(APSMediaTrackingEvents.MediaEventType type, Bundle additionalInfo)
APSMediaPlayerTrackingEventListeneronTrackingEventReceived in interface APSMediaPlayerTrackingEventListenertype - The type of event getting firedadditionalInfo - A bundle of additional metadata, such as the current position in CLOCK_TICK events