Class APSMediaPlayerImageOverlayController
java.lang.Object
com.appscend.overlaycontrollers.APSMediaPlayerOverlayController
com.appscend.overlaycontrollers.APSMediaPlayerClosableOverlayController
com.appscend.overlaycontrollers.APSMediaPlayerImageOverlayController
- All Implemented Interfaces:
KRAdapter
The APSMediaPlayerImageOverlayController allows placing an image on top of video content.
Configuration
To create an APSMediaOverlay of image type:
- set the overlay object's
typeproperty toAPSImageOverlay set the overlay objectinvalid input: '&''s
propertiesproperty to aHashMapthat can have the following keys and values:- kAPSImageOverlayClickthrough: set this key to a
Stringrepresenting the URL that should be launched when the overlay is tapped. - kAPSImageOverlayClicktracking: set this key to a
ArrayListofStringobjects that will be tracked by the player when the overlay is tapped (see[APSMediaPlayer trackforEvent:]). Note that thekAPSImageOverlayClickthroughkey must also be set for tracking to happen. - kAPSImageOverlayViewtracking: set this key to a
ArrayListofStringobjects that will be tracked by the player when the overlay is displayed (see[APSMediaPlayer trackforEvent:]). - kAPSImageOverlayResourceURL:
Stringrepresenting the image to be loaded. - kAPSImageOverlayErrorURLs: set this key to a
ArrayListofStringobjects that will be tracked by the player when there is an error loading the image (see[APSMediaPlayer trackforEvent:]). - kAPSImageOverlayBackgroundColor: the background color of the overlay. Set this to a
Stringcontaining the hex color representation. Defaults to[UIColor clearColor]. kAPSImageOverlayStretchMode:
Stringrepresenting the possible ways of scaling the image in the overlay surface. Possible values are:- “aspectFit”, that will set the overlay’s
ScaleTypetoScaleType.FIT_CENTER - “aspectFill”, that will set the overlay’s
ScaleTypetoScaleType.CENTER_CROP - “fill”, that will set the overlay’s
ScaleTypetoScaleType.FIT_XY - “bottom”, that will set the overlay’s
ScaleTypetoScaleType.MATRIXand will align the elements to the bottom - “top”, that will set the overlay’s
ScaleTypetoScaleType.MATRIXand will align the elements to the top - “left”, that will set the overlay’s
ScaleTypetoScaleType.MATRIXand will align the elements to the left - “right”, that will set the overlay’s
ScaleTypetoScaleType.MATRIXand will align the elements to the right
- “aspectFit”, that will set the overlay’s
- kAPSImageOverlayClickthrough: set this key to a
-
Nested Class Summary
Nested Classes -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final StringFields inherited from class APSMediaPlayerClosableOverlayController
kAPSCloseBackgroundColor, kAPSCloseFinalAlpha, kAPSCloseHidden, kAPSCloseImage, kAPSCloseInitialAlpha, kAPSCloseOffset, kAPSCloseOffsetX, kAPSCloseOffsetY, kAPSCloseProgressColor, kAPSCloseProgressTrackColor, kAPSCloseSize, kAPSCloseTrackingURLs, kAPSCloseXColorModifier and TypeFieldDescriptionstatic final Stringthe background color of the close button view.static final Stringa Number indicating the opacity of the close button after it has been activated for receiving taps.static final Stringset this key to @YES to skip displaying the close button for this overlay.static final Stringif set to a UIImage, that image will be used instead of the standard progress-wheel close button.static final Stringa Number indicating the opacity of the close button before it is activated for receiving taps.static final Stringa Number that indicates the offset, in seconds, after which the close button should become activated for receiving taps.static final Stringthe horizontal offset of the close button, relative to the right margin of the overlay's view.static final Stringthe vertical offset of the close button, relative to the top margin of the overlay's view.static final Stringthe color of the circular bar that indicates the currently elapsed time until the close button can be tapped.static final Stringthe color of the circular bar that indicates the total time until the close button can be tapped.static final Stringa Number representing the length of a side of the close button square, in points.static final Stringa Array of URLs that will be tracked by the player when the close button is tapped and the overlay is removed (see [APSMediaPlayer track:forEvent:type:]).static final Stringthe color of the X symbol in the center of the player.Fields inherited from class APSMediaPlayerOverlayController
overlay -
Constructor Summary
Constructors -
Method Summary
Methods inherited from class APSMediaPlayerClosableOverlayController
activateButton, removeCloseButtonModifier and TypeMethodDescriptionvoidvoidThis method removes the close button from the current view stack.Methods inherited from class APSMediaPlayerOverlayController
refreshModifier and TypeMethodDescriptionvoidrefresh(android.content.Context context, android.view.ViewGroup viewGroup)
-
Field Details
-
kAPSImageOverlayClickthrough
- See Also:
-
kAPSImageOverlayClicktracking
- See Also:
-
kAPSImageOverlayViewtracking
- See Also:
-
kAPSImageOverlayResourceURL
- See Also:
-
kAPSImageOverlayErrorURLs
- See Also:
-
kAPSImageOverlayBackgroundColor
- See Also:
-
kAPSImageOverlayStretchMode
- See Also:
-
kAPSImageOverlayWebviewDismissAction
- See Also:
-
APSImageOverlay
- See Also:
-
-
Constructor Details
-
APSMediaPlayerImageOverlayController
public APSMediaPlayerImageOverlayController()
-
-
Method Details
-
type
- Specified by:
typein interfaceKRAdapter- Overrides:
typein classAPSMediaPlayerClosableOverlayController
-
load
public void load(android.content.Context context) Description copied from class:APSMediaPlayerOverlayControllerBuilds the overlay's view. When the Activity is recreated the player moves this view to the new one unchanged, so the view must not keep a reference to the Activity it was built with.- Overrides:
loadin classAPSMediaPlayerClosableOverlayController
-
addViewToContainer
public void addViewToContainer(android.view.ViewGroup viewGroup) - Overrides:
addViewToContainerin classAPSMediaPlayerClosableOverlayController
-
getView
public android.view.View getView()- Overrides:
getViewin classAPSMediaPlayerClosableOverlayController
-
hideOverlay
public void hideOverlay()- Overrides:
hideOverlayin classAPSMediaPlayerClosableOverlayController
-
getAlpha
public float getAlpha()- Overrides:
getAlphain classAPSMediaPlayerClosableOverlayController
-
preload
public void preload()
-