Class APSMediaPlayerTextOverlayController
java.lang.Object
com.appscend.overlaycontrollers.APSMediaPlayerOverlayController
com.appscend.overlaycontrollers.APSMediaPlayerTextOverlayController
- All Implemented Interfaces:
KRAdapter
The APSMediaPlayerTextOverlayController allows the displaying text on top of video content.
Configuration
To create an APSMediaOverlay of text type:
- set the overlay object's
typeproperty toAPSTextOverlay set the overlay object's
propertiesproperty to aHashMapinvalid input: '<'String, Object>that can have the following keys and values:- kAPSTextOverlayString: the
Stringto be rendered. - kAPSTextOverlayStringColor: Font color for the rendered text. Set this to a
Stringcontaining the hex color representation. Defaults to[UIColor whiteColor]. - kAPSTextOverlayStringFont:
Stringindicating the font family to be used. Defaults to 'Helvetica'. - kAPSTextOverlayStringSize:
Integerindicating the font size to be used. Defaults to 13.
- kAPSTextOverlayString: the
Replacable Placeholders
The APSMediaPlayerTextOverlayController will replace the following string placeholders with dynamic information:
- 'remaining' will be replaced with the remaining number of seconds from the current video clip being rendered.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final StringFields inherited from class APSMediaPlayerOverlayController
overlay -
Constructor Summary
Constructors -
Method Summary
Methods inherited from class APSMediaPlayerOverlayController
refreshModifier and TypeMethodDescriptionvoidrefresh(android.content.Context context, android.view.ViewGroup viewGroup)
-
Field Details
-
kAPSTextOverlayString
- See Also:
-
kAPSTextOverlayStringColor
- See Also:
-
kAPSTextOverlayStringFont
- See Also:
-
kAPSTextOverlayStringSize
- See Also:
-
APSTextOverlay
- See Also:
-
-
Constructor Details
-
APSMediaPlayerTextOverlayController
public APSMediaPlayerTextOverlayController()
-
-
Method Details
-
type
-
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.- Specified by:
loadin classAPSMediaPlayerOverlayController
-
addViewToContainer
public void addViewToContainer(android.view.ViewGroup viewGroup) - Specified by:
addViewToContainerin classAPSMediaPlayerOverlayController
-
update
public void update(int duration, int currentPlaybackTime) -
getView
public android.view.View getView()- Specified by:
getViewin classAPSMediaPlayerOverlayController
-
getAlpha
public float getAlpha()- Specified by:
getAlphain classAPSMediaPlayerOverlayController
-
hideOverlay
public void hideOverlay()- Specified by:
hideOverlayin classAPSMediaPlayerOverlayController
-