public class LayerManager
extends java.lang.Object
Given a FrameLayout
, a Video
, and a set of Layer
objects, the
LayerManager
will create an ExoplayerWrapper
for the Video
object and
create each Layer
object's view and overlay it on the FrameLayout
object.
Look at SimpleVideoPlayer
to see LayerManager
in action.
Constructor and Description |
---|
LayerManager(android.app.Activity activity,
android.widget.FrameLayout container,
Video video,
java.util.List<Layer> layers)
Given a container, create the video layers and add them to the container.
|
Modifier and Type | Method and Description |
---|---|
android.app.Activity |
getActivity()
Returns the activity which displays the video player created by this
LayerManager . |
android.widget.FrameLayout |
getContainer()
|
ObservablePlayerControl |
getControl()
Returns the
ObservablePlayerControl which can be used to control the video playback
(ex. |
ExoplayerWrapper |
getExoplayerWrapper()
Returns the wrapper which ties the video player to
ExoPlayer . |
void |
release()
When the video player is no longer needed, call this method.
|
public LayerManager(android.app.Activity activity, android.widget.FrameLayout container, Video video, java.util.List<Layer> layers)
activity
- The activity which will display the video player.container
- The frame layout which will contain the views.video
- the video that will be played by this LayerManager.layers
- The layers which should be displayed on top of the container.public android.app.Activity getActivity()
LayerManager
.public android.widget.FrameLayout getContainer()
public ObservablePlayerControl getControl()
ObservablePlayerControl
which can be used to control the video playback
(ex. pause, play, seek).public ExoplayerWrapper getExoplayerWrapper()
ExoPlayer
.public void release()