Package com.jwplayer.pub.view
Class JWPlayerView
java.lang.Object
FrameLayout
com.jwplayer.pub.view.JWPlayerView
public class JWPlayerView
extends FrameLayout
JW Player SDK for Android main class, contains the player API methods, event listeners, and handles the instantiation of all classes needed to play video.
-
Constructor Summary
ConstructorsConstructorDescriptionJWPlayerView
(Context context) JWPlayerView
(Context context, AttributeSet attrs) Constructor that is called when inflating a view from XML. -
Method Summary
Modifier and TypeMethodDescriptionControlsContainerView
Gets the JW Player controls container.Deprecated.getPlayer
(LifecycleOwner lifecycleOwner) getPlayer
(LifecycleOwner lifecycleOwner, OfflineDelegate offlineDelegate) void
getPlayerAsync
(Context context, LifecycleOwner lifecycleOwner, JWPlayerImpl.PlayerInitializationListener listener) void
getPlayerAsync
(Context context, LifecycleOwner lifecycleOwner, JWPlayerImpl.PlayerInitializationListener listener, OfflineDelegate offlineDelegate)
-
Constructor Details
-
JWPlayerView
public JWPlayerView(Context context) -
JWPlayerView
public JWPlayerView(Context context, AttributeSet attrs) Constructor that is called when inflating a view from XML.- Parameters:
context
- The view context.attrs
- The attributes to the view.
-
-
Method Details
-
getPlayer
Deprecated. -
getPlayer
-
getPlayer
-
getPlayerAsync
public void getPlayerAsync(Context context, LifecycleOwner lifecycleOwner, JWPlayerImpl.PlayerInitializationListener listener) -
getPlayerAsync
public void getPlayerAsync(Context context, LifecycleOwner lifecycleOwner, JWPlayerImpl.PlayerInitializationListener listener, OfflineDelegate offlineDelegate) -
getControlsContainer
public ControlsContainerView getControlsContainer()Gets the JW Player controls container. Use this to replace Views in the JWPlayerView hierarchy and customize the player UI
-