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 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 public JWPlayer getPlayer()
      Deprecated.
    • getPlayer

      public JWPlayer getPlayer(LifecycleOwner lifecycleOwner)
    • getPlayer

      public JWPlayer getPlayer(LifecycleOwner lifecycleOwner, OfflineDelegate offlineDelegate)
    • 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