Class BrightcovePlayerFragment

java.lang.Object
androidx.fragment.app.Fragment
com.brightcove.player.appcompat.BrightcovePlayerFragment
All Implemented Interfaces:
android.content.ComponentCallbacks, android.view.View.OnCreateContextMenuListener, androidx.activity.result.ActivityResultCaller, androidx.lifecycle.HasDefaultViewModelProviderFactory, androidx.lifecycle.LifecycleOwner, androidx.lifecycle.ViewModelStoreOwner, androidx.savedstate.SavedStateRegistryOwner

public class BrightcovePlayerFragment extends androidx.fragment.app.Fragment
A backward compatible androidx-namespaced Fragment class with basic life cycle and full screen support. The onCreateView() should be extended to wire up the fragment's layout to the baseVideoView instance variable before calling super.onCreateView(). For example:

baseVideoView = (BaseVideoView) findViewById(R.id.brightcove_video_view);

  • Nested Class Summary

    Nested classes/interfaces inherited from class androidx.fragment.app.Fragment

    androidx.fragment.app.Fragment.InstantiationException, androidx.fragment.app.Fragment.SavedState
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    protected BaseVideoView
     
    static final String
     
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    Expands the BrightcoveVideoView layout parameters to match the parent and hides the ActionBar.
    void
    Returns the BrightcoveVideoView to it's original layout parameters and restores the ActionBar.
     
     
    void
    onActivityCreated(android.os.Bundle savedInstanceState)
     
    android.view.View
    onCreateView(android.view.LayoutInflater inflater, android.view.ViewGroup container, android.os.Bundle savedInstanceState)
     
    void
     
    void
     
    void
     
    void
     
    void
     
    void
    onSaveInstanceState(android.os.Bundle bundle)
     
    void
     
    void
     
    void
    onViewStateRestored(android.os.Bundle savedInstanceState)
     

    Methods inherited from class androidx.fragment.app.Fragment

    dump, equals, getActivity, getAllowEnterTransitionOverlap, getAllowReturnTransitionOverlap, getArguments, getChildFragmentManager, getContext, getDefaultViewModelProviderFactory, getEnterTransition, getExitTransition, getFragmentManager, getHost, getId, getLayoutInflater, getLayoutInflater, getLifecycle, getLoaderManager, getParentFragment, getParentFragmentManager, getReenterTransition, getResources, getRetainInstance, getReturnTransition, getSavedStateRegistry, getSharedElementEnterTransition, getSharedElementReturnTransition, getString, getString, getTag, getTargetFragment, getTargetRequestCode, getText, getUserVisibleHint, getView, getViewLifecycleOwner, getViewLifecycleOwnerLiveData, getViewModelStore, hashCode, hasOptionsMenu, instantiate, instantiate, isAdded, isDetached, isHidden, isInLayout, isMenuVisible, isRemoving, isResumed, isStateSaved, isVisible, onActivityResult, onAttach, onAttach, onAttachFragment, onConfigurationChanged, onContextItemSelected, onCreate, onCreateAnimation, onCreateAnimator, onCreateContextMenu, onCreateOptionsMenu, onDestroyOptionsMenu, onGetLayoutInflater, onHiddenChanged, onInflate, onInflate, onLowMemory, onMultiWindowModeChanged, onOptionsItemSelected, onOptionsMenuClosed, onPictureInPictureModeChanged, onPrepareOptionsMenu, onPrimaryNavigationFragmentChanged, onRequestPermissionsResult, onViewCreated, postponeEnterTransition, postponeEnterTransition, registerForActivityResult, registerForActivityResult, registerForContextMenu, requestPermissions, requireActivity, requireArguments, requireContext, requireFragmentManager, requireHost, requireParentFragment, requireView, setAllowEnterTransitionOverlap, setAllowReturnTransitionOverlap, setArguments, setEnterSharedElementCallback, setEnterTransition, setExitSharedElementCallback, setExitTransition, setHasOptionsMenu, setInitialSavedState, setMenuVisibility, setReenterTransition, setRetainInstance, setReturnTransition, setSharedElementEnterTransition, setSharedElementReturnTransition, setTargetFragment, setUserVisibleHint, shouldShowRequestPermissionRationale, startActivity, startActivity, startActivityForResult, startActivityForResult, startIntentSenderForResult, startPostponedEnterTransition, toString, unregisterForContextMenu

    Methods inherited from class java.lang.Object

    clone, finalize, getClass, notify, notifyAll, wait, wait, wait
  • Field Details

  • Constructor Details

    • BrightcovePlayerFragment

      public BrightcovePlayerFragment()
  • Method Details

    • getBaseVideoView

      public BaseVideoView getBaseVideoView()
    • enterFullScreen

      public void enterFullScreen()
      Expands the BrightcoveVideoView layout parameters to match the parent and hides the ActionBar.
    • exitFullScreen

      public void exitFullScreen()
      Returns the BrightcoveVideoView to it's original layout parameters and restores the ActionBar.
    • getEventLogger

      public EventLogger getEventLogger()
    • onActivityCreated

      public void onActivityCreated(android.os.Bundle savedInstanceState)
      Overrides:
      onActivityCreated in class androidx.fragment.app.Fragment
    • onCreateView

      public android.view.View onCreateView(android.view.LayoutInflater inflater, android.view.ViewGroup container, android.os.Bundle savedInstanceState)
      Overrides:
      onCreateView in class androidx.fragment.app.Fragment
    • onStart

      public void onStart()
      Overrides:
      onStart in class androidx.fragment.app.Fragment
    • onPause

      public void onPause()
      Overrides:
      onPause in class androidx.fragment.app.Fragment
    • onResume

      public void onResume()
      Overrides:
      onResume in class androidx.fragment.app.Fragment
    • onDestroy

      public void onDestroy()
      Overrides:
      onDestroy in class androidx.fragment.app.Fragment
    • onDestroyView

      public void onDestroyView()
      Overrides:
      onDestroyView in class androidx.fragment.app.Fragment
    • onDetach

      public void onDetach()
      Overrides:
      onDetach in class androidx.fragment.app.Fragment
    • onStop

      public void onStop()
      Overrides:
      onStop in class androidx.fragment.app.Fragment
    • onSaveInstanceState

      public void onSaveInstanceState(android.os.Bundle bundle)
      Overrides:
      onSaveInstanceState in class androidx.fragment.app.Fragment
    • onViewStateRestored

      public void onViewStateRestored(android.os.Bundle savedInstanceState)
      Overrides:
      onViewStateRestored in class androidx.fragment.app.Fragment