FullScreenPlayer

open class FullScreenPlayer : AbstractPlayerFragment<FragmentPlayerBinding> (source)

Inheritors

Constructors

Link copied to clipboard
constructor()

Properties

Link copied to clipboard
open override var _binding: FragmentPlayerBinding?
Link copied to clipboard
@get:Nullable
val activity: FragmentActivity?
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
@get:Nullable
var arguments: Bundle?
Link copied to clipboard
open val binding: FragmentPlayerBinding?
Link copied to clipboard
open override val bindingCreator: BaseFragment.BindingCreator<FragmentPlayerBinding>
Link copied to clipboard
@get:NonNull
val childFragmentManager: FragmentManager
Link copied to clipboard
@get:Nullable
open val context: Context?
Link copied to clipboard
protected var currentQualityProfile: Int

Default profile 1 Decides how links should be sorted based on a priority system. This will be set in runtime based on settings.

Link copied to clipboard
@get:NonNull
@get:CallSuper
open val defaultViewModelCreationExtras: CreationExtras
Link copied to clipboard
@get:NonNull
open val defaultViewModelProviderFactory: ViewModelProvider.Factory
Link copied to clipboard
@get:Nullable
open var enterTransition: Any?
Link copied to clipboard
@get:Nullable
open var exitTransition: Any?
Link copied to clipboard
@get:Nullable
val fragmentManager: FragmentManager?
Link copied to clipboard
protected var hasEpisodes: Boolean
Link copied to clipboard
@get:Nullable
val host: Any?
Link copied to clipboard
val id: Int
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
protected var isLocked: Boolean
Link copied to clipboard
@get:RestrictTo(value = [RestrictTo.Scope.LIBRARY_GROUP_PREFIX])
val isMenuVisible: Boolean
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
protected var isShowing: Boolean
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
@get:NonNull
val layoutInflater: LayoutInflater
Link copied to clipboard
@get:NonNull
open val lifecycle: Lifecycle
Link copied to clipboard
@get:NonNull
open val loaderManager: LoaderManager
Link copied to clipboard
protected open var lockRotation: Boolean
Link copied to clipboard
protected var mMediaSession: MediaSession?
Link copied to clipboard
@RestrictTo(value = [RestrictTo.Scope.LIBRARY])
@Nullable
var mPreviousWho: String?
Link copied to clipboard
@get:Nullable
val parentFragment: Fragment?
Link copied to clipboard
@get:NonNull
val parentFragmentManager: FragmentManager
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
protected var playerBinding: PlayerCustomLayoutBinding?
Link copied to clipboard
protected var playerHostView: PlayerView?

The shared PlayerView host that owns all player state and view references.

Link copied to clipboard
val playerPausePlay: ImageView?
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
val playerView: PlayerView?

The underlying androidx.media3.ui.PlayerView widget (named to avoid conflict with our PlayerView).

Link copied to clipboard
@get:Nullable
open var reenterTransition: Any?
Link copied to clipboard
@get:NonNull
val resources: Resources
Link copied to clipboard
Link copied to clipboard
@get:Nullable
open var returnTransition: Any?
Link copied to clipboard
protected var rotatedManually: Boolean
Link copied to clipboard
@get:NonNull
val savedStateRegistry: SavedStateRegistry
Link copied to clipboard
protected var selectSourceDialog: Dialog?

Wet code but this can not be made into a function as it is a setter.

Link copied to clipboard
protected var selectSpeedDialog: Dialog?
Link copied to clipboard
protected var selectSubtitlesDialog: Dialog?
Link copied to clipboard
protected var selectTrackDialog: Dialog?
Link copied to clipboard
@get:Nullable
open var sharedElementEnterTransition: Any?
Link copied to clipboard
@get:Nullable
open var sharedElementReturnTransition: Any?
Link copied to clipboard
protected var subtitleDelay: Long
Link copied to clipboard
val subView: SubtitleView?
Link copied to clipboard
@get:Nullable
val tag: String?
Link copied to clipboard
@get:Nullable
val targetFragment: Fragment?
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
@get:Nullable
open val view: View?
Link copied to clipboard
@get:MainThread
@get:NonNull
open val viewLifecycleOwner: LifecycleOwner
Link copied to clipboard
@get:NonNull
open val viewLifecycleOwnerLiveData: LiveData<LifecycleOwner?>
Link copied to clipboard
@get:NonNull
open val viewModelStore: ViewModelStore

Functions

Link copied to clipboard
protected fun animateLayoutChanges()
Link copied to clipboard
protected fun autoHide()
Link copied to clipboard
open fun createBinding(inflater: LayoutInflater, container: ViewGroup?, savedInstanceState: Bundle?): View?
Link copied to clipboard

Safer activity?.onBackPressedDispatcher?.onBackPressed() with fallback behavior instead of app crash

Link copied to clipboard
open fun dump(@NonNull prefix: String, @Nullable fd: FileDescriptor?, @NonNull writer: PrintWriter, @Nullable args: Array<out String?>??)
Link copied to clipboard
open override fun embeddedSubtitlesFetched(subtitles: List<SubtitleData>)
Link copied to clipboard
open override fun exitedPipMode()
Link copied to clipboard
open override fun fixLayout(view: View)

Player fragments don't need system-bar padding adjustment by default.

Link copied to clipboard
fun Fragment.getChooseFolderLauncher(dirSelected: (uri: Uri?, path: String?) -> Unit): ActivityResultLauncher<Uri?>
Link copied to clipboard
Link copied to clipboard
@NonNull
fun getString(@StringRes resId: Int): String
@NonNull
fun getString(@StringRes resId: Int, @Nullable vararg formatArgs: Any?): String
Link copied to clipboard
@NonNull
fun getText(@StringRes resId: Int): CharSequence
Link copied to clipboard
open override fun hasNextMirror(): Boolean
Link copied to clipboard
@RestrictTo(value = [RestrictTo.Scope.LIBRARY_GROUP_PREFIX])
fun hasOptionsMenu(): Boolean
Link copied to clipboard
fun Fragment.hideKeyboard()
Link copied to clipboard
protected fun hidePlayerUI()
Link copied to clipboard

Checks if any top level dialog is open and showing

Link copied to clipboard
Link copied to clipboard
open override fun isUIShowing(): Boolean

PlayerView.Callbacks touch overrides

Link copied to clipboard
open override fun nextEpisode()
Link copied to clipboard
open override fun nextMirror()
Link copied to clipboard
Link copied to clipboard
fun <T, V : ViewBinding> BaseFragment<V>.observe(liveData: LiveData<T>, action: (T) -> Unit)

NOTE: Only one observer at a time per value

Link copied to clipboard
fun <T, V : ViewBinding> BaseFragment<V>.observeNullable(liveData: LiveData<T>, action: (T?) -> Unit)

Attaches an observable to the root binding, instead of the fragment. This is more efficient as it will not call observe if the view is in the background.

Link copied to clipboard
@MainThread
@CallSuper
open fun onActivityCreated(@Nullable savedInstanceState: Bundle?)
Link copied to clipboard
open fun onActivityResult(requestCode: Int, resultCode: Int, @Nullable data: Intent?)
Link copied to clipboard
@MainThread
@CallSuper
open fun onAttach(@NonNull activity: Activity)
@MainThread
@CallSuper
open fun onAttach(@NonNull context: Context)
Link copied to clipboard
@MainThread
open fun onAttachFragment(@NonNull childFragment: Fragment)
Link copied to clipboard
open override fun onAutoHideUI()

Called when the auto-hide timer fires: UI is showing, no touch is active. Implement to hide the player controls.

Link copied to clipboard
open fun onBindingCreated(binding: FragmentPlayerBinding)

Called when the binding is safely created and view is ready. Overload without savedInstanceState for convenience.

open override fun onBindingCreated(binding: FragmentPlayerBinding, savedInstanceState: Bundle?)

Called when the binding is safely created and view is ready. Can be overridden to provide fragment-specific initialization.

Link copied to clipboard
open fun onBrightnessExtra(alpha: Float)

Called during brightness swipe with the current extra-brightness alpha (0–1).

Link copied to clipboard
open override fun onConfigurationChanged(newConfig: Configuration)

Called when the device configuration changes (e.g., orientation). Re-applies system bar padding fixes to the root view to ensure it readjusts for orientation changes.

Link copied to clipboard
@MainThread
open fun onContextItemSelected(@NonNull item: MenuItem): Boolean
Link copied to clipboard
@MainThread
@CallSuper
open fun onCreate(@Nullable savedInstanceState: Bundle?)
Link copied to clipboard
@MainThread
@Nullable
open fun onCreateAnimation(transit: Int, enter: Boolean, nextAnim: Int): Animation?
Link copied to clipboard
@MainThread
@Nullable
open fun onCreateAnimator(transit: Int, enter: Boolean, nextAnim: Int): Animator?
Link copied to clipboard
@MainThread
open fun onCreateContextMenu(@NonNull menu: ContextMenu, @NonNull v: View, @Nullable menuInfo: ContextMenu.ContextMenuInfo?)
Link copied to clipboard
@MainThread
open fun onCreateOptionsMenu(@NonNull menu: Menu, @NonNull inflater: MenuInflater)
Link copied to clipboard
open override fun onCreateView(inflater: LayoutInflater, container: ViewGroup?, savedInstanceState: Bundle?): View?
Link copied to clipboard
open override fun onDestroy()
Link copied to clipboard
@MainThread
open fun onDestroyOptionsMenu()
Link copied to clipboard
open override fun onDestroyView()

Cleans up the binding reference when the view is destroyed to avoid memory leaks.

Link copied to clipboard
@MainThread
@CallSuper
open fun onDetach()
Link copied to clipboard
open fun onDownload(event: DownloadEvent)
Link copied to clipboard
open override fun onGestureEnd(hadSwipe: Boolean, wasUiShowing: Boolean)

Called at the end of each touch sequence.

Link copied to clipboard
@NonNull
open fun onGetLayoutInflater(@Nullable savedInstanceState: Bundle?): LayoutInflater
Link copied to clipboard
@MainThread
open fun onHiddenChanged(hidden: Boolean)
Link copied to clipboard
open override fun onHidePlayerUI()

Called when a swipe gesture begins; hide the player UI if desired.

Link copied to clipboard
open override fun onHoldSpeedUp(show: Boolean)

Called when the hold-for-speedup gesture starts (show=true) or ends (show=false).

Link copied to clipboard
@UiThread
@CallSuper
open fun onInflate(@NonNull activity: Activity, @NonNull attrs: AttributeSet, @Nullable savedInstanceState: Bundle?)
@UiThread
@CallSuper
open fun onInflate(@NonNull context: Context, @NonNull attrs: AttributeSet, @Nullable savedInstanceState: Bundle?)
Link copied to clipboard
@MainThread
@CallSuper
open fun onLowMemory()
Link copied to clipboard
open fun onMultiWindowModeChanged(isInMultiWindowMode: Boolean)
Link copied to clipboard
@MainThread
open fun onOptionsItemSelected(@NonNull item: MenuItem): Boolean
Link copied to clipboard
@MainThread
open fun onOptionsMenuClosed(@NonNull menu: Menu)
Link copied to clipboard
open override fun onPause()
Link copied to clipboard
open override fun onPictureInPictureModeChanged(isInPictureInPictureMode: Boolean)
Link copied to clipboard
@MainThread
open fun onPrepareOptionsMenu(@NonNull menu: Menu)
Link copied to clipboard
@MainThread
open fun onPrimaryNavigationFragmentChanged(isPrimaryNavigationFragment: Boolean)
Link copied to clipboard
open fun onRequestPermissionsResult(requestCode: Int, @NonNull permissions: Array<out String?>, @NonNull grantResults: IntArray)
Link copied to clipboard
open override fun onResume()
Link copied to clipboard
open override fun onSaveInstanceState(outState: Bundle)
Link copied to clipboard
open override fun onSeekPreviewText(text: String?)

Called with seek-preview text during a horizontal-swipe, or null to clear it.

Link copied to clipboard
open override fun onSingleTap()

Called on a short single-tap on empty player area (no swipe, no double-tap).

Link copied to clipboard
@MainThread
@CallSuper
open fun onStart()
Link copied to clipboard
open override fun onStop()
Link copied to clipboard
open fun onTimestamp(timestamp: VideoSkipStamp?)
Link copied to clipboard
open fun onTimestampSkipped(timestamp: VideoSkipStamp)
Link copied to clipboard
open override fun onTouchDown()

Called on a valid ACTION_DOWN; use for e.g. dismissing an episode overlay.

Link copied to clipboard
open override fun onTracksInfoChanged()
Link copied to clipboard
override fun onViewCreated(view: View, savedInstanceState: Bundle?)
Link copied to clipboard
open fun onViewReady(view: View, savedInstanceState: Bundle?)

Called after the fragment's view has been created.

Link copied to clipboard
@MainThread
@CallSuper
open fun onViewStateRestored(@Nullable savedInstanceState: Bundle?)
Link copied to clipboard
open fun openOnlineSubPicker(context: Context, loadResponse: LoadResponse?, dismissCallback: () -> Unit)
Link copied to clipboard
fun Fragment.pickDownloadPath(uri: Uri?, path: String?)
Link copied to clipboard
open override fun pickLayout(): Int

Pick a layout resource ID for the fragment.

Link copied to clipboard
open override fun playerDimensionsLoaded(width: Int, height: Int)
Link copied to clipboard
open override fun playerError(exception: Throwable)

Delegates to PlayerView.playerError by default; override to customize.

Link copied to clipboard
open override fun playerPositionChanged(position: Long, duration: Long)
Link copied to clipboard
open override fun playerStatusChanged()
Link copied to clipboard
open fun playerUpdated(player: Any?)

Called after PlayerView finishes its own player-attached setup (MediaSession, ExoPlayer view).

Link copied to clipboard
fun postponeEnterTransition(duration: Long, @NonNull timeUnit: TimeUnit)
Link copied to clipboard
open override fun prevEpisode()
Link copied to clipboard
@MainThread
@NonNull
fun <I : Any?, O : Any?> registerForActivityResult(@NonNull contract: ActivityResultContract<I, O>, @NonNull callback: ActivityResultCallback<O>): ActivityResultLauncher<I?>
@MainThread
@NonNull
fun <I : Any?, O : Any?> registerForActivityResult(@NonNull contract: ActivityResultContract<I, O>, @NonNull registry: ActivityResultRegistry, @NonNull callback: ActivityResultCallback<O>): ActivityResultLauncher<I?>
Link copied to clipboard
open fun registerForContextMenu(@NonNull view: View)
Link copied to clipboard
fun requestPermissions(@NonNull permissions: Array<out String?>, requestCode: Int)
Link copied to clipboard
@NonNull
fun requireActivity(): FragmentActivity
Link copied to clipboard
@NonNull
fun requireArguments(): Bundle
Link copied to clipboard
@NonNull
fun requireContext(): Context
Link copied to clipboard
@NonNull
fun requireFragmentManager(): FragmentManager
Link copied to clipboard
@NonNull
fun requireHost(): Any
Link copied to clipboard
@NonNull
fun requireParentFragment(): Fragment
Link copied to clipboard
@NonNull
fun requireView(): View
Link copied to clipboard
open override fun resize(resize: PlayerResize, showToast: Boolean)
Link copied to clipboard
open fun setEnterSharedElementCallback(@Nullable callback: SharedElementCallback?)
Link copied to clipboard
open fun setExitSharedElementCallback(@Nullable callback: SharedElementCallback?)
Link copied to clipboard
open fun setHasOptionsMenu(hasMenu: Boolean)
Link copied to clipboard
open fun setInitialSavedState(@Nullable state: Fragment.SavedState?)
Link copied to clipboard
open fun setMenuVisibility(menuVisible: Boolean)
Link copied to clipboard
fun Fragment.setSystemBarsPadding()
Link copied to clipboard
open fun setTargetFragment(@Nullable fragment: Fragment?, requestCode: Int)
Link copied to clipboard
fun Fragment?.setToolBarScrollFlags()
Link copied to clipboard
fun Fragment?.setUpToolbar(@StringRes title: Int)
fun Fragment?.setUpToolbar(title: String)
Link copied to clipboard
open fun shouldShowRequestPermissionRationale(@NonNull permission: String): Boolean
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
open fun startActivity(@NonNull intent: Intent)
open fun startActivity(@NonNull intent: Intent, @Nullable options: Bundle?)
Link copied to clipboard
open fun startActivityForResult(@NonNull intent: Intent, requestCode: Int)
open fun startActivityForResult(@NonNull intent: Intent, requestCode: Int, @Nullable options: Bundle?)
Link copied to clipboard
open fun startIntentSenderForResult(@NonNull intent: IntentSender, requestCode: Int, @Nullable fillInIntent: Intent?, flagsMask: Int, flagsValues: Int, extraFlags: Int, @Nullable options: Bundle?)
Link copied to clipboard
Link copied to clipboard
open override fun subtitlesChanged()
Link copied to clipboard
protected fun uiReset()
Link copied to clipboard
open fun unregisterForContextMenu(@NonNull view: View)
Link copied to clipboard
fun updateSpeedDialogBinding(binding: SpeedDialogBinding)