Package com.brightcove.player.appcompat
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);
-
-
Field Summary
Fields Modifier and Type Field Description protected BaseVideoView
baseVideoView
static java.lang.String
TAG
-
Constructor Summary
Constructors Constructor Description BrightcovePlayerFragment()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
enterFullScreen()
Expands the BrightcoveVideoView layout parameters to match the parent and hides the ActionBar.void
exitFullScreen()
Returns the BrightcoveVideoView to it's original layout parameters and restores the ActionBar.BaseVideoView
getBaseVideoView()
EventLogger
getEventLogger()
void
onActivityCreated(android.os.Bundle savedInstanceState)
android.view.View
onCreateView(android.view.LayoutInflater inflater, android.view.ViewGroup container, android.os.Bundle savedInstanceState)
void
onDestroy()
void
onDestroyView()
void
onDetach()
void
onPause()
void
onResume()
void
onSaveInstanceState(android.os.Bundle bundle)
void
onStart()
void
onStop()
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
-
-
-
-
Field Detail
-
TAG
public static final java.lang.String TAG
-
baseVideoView
protected BaseVideoView baseVideoView
-
-
Method Detail
-
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 classandroidx.fragment.app.Fragment
-
onCreateView
public android.view.View onCreateView(android.view.LayoutInflater inflater, android.view.ViewGroup container, android.os.Bundle savedInstanceState)
- Overrides:
onCreateView
in classandroidx.fragment.app.Fragment
-
onStart
public void onStart()
- Overrides:
onStart
in classandroidx.fragment.app.Fragment
-
onPause
public void onPause()
- Overrides:
onPause
in classandroidx.fragment.app.Fragment
-
onResume
public void onResume()
- Overrides:
onResume
in classandroidx.fragment.app.Fragment
-
onDestroy
public void onDestroy()
- Overrides:
onDestroy
in classandroidx.fragment.app.Fragment
-
onDestroyView
public void onDestroyView()
- Overrides:
onDestroyView
in classandroidx.fragment.app.Fragment
-
onDetach
public void onDetach()
- Overrides:
onDetach
in classandroidx.fragment.app.Fragment
-
onStop
public void onStop()
- Overrides:
onStop
in classandroidx.fragment.app.Fragment
-
onSaveInstanceState
public void onSaveInstanceState(android.os.Bundle bundle)
- Overrides:
onSaveInstanceState
in classandroidx.fragment.app.Fragment
-
onViewStateRestored
public void onViewStateRestored(android.os.Bundle savedInstanceState)
- Overrides:
onViewStateRestored
in classandroidx.fragment.app.Fragment
-
-