Package com.castlabs.sdk.debug.view

# Class PlayerSettingsFragment

java.lang.Object
androidx.fragment.app.Fragment
com.castlabs.sdk.debug.view.PlayerSettingsFragment

All Implemented Interfaces:
  `ComponentCallbacks`, `View.OnCreateContextMenuListener`, `androidx.activity.result.ActivityResultCaller`, `androidx.lifecycle.HasDefaultViewModelProviderFactory`, `androidx.lifecycle.LifecycleOwner`, `androidx.lifecycle.ViewModelStoreOwner`, `androidx.savedstate.SavedStateRegistryOwner`

public class PlayerSettingsFragment extends androidx.fragment.app.Fragment
A fragment that provides a user interface for configuring player settings. This includes playback configuration, ABR (Adaptive Bitrate) settings, buffer configuration, and bandwidth estimation parameters.

- ## Nested Class Summary

  Nested Classes
  Modifier and Type
  Class
  Description
  `static interface`
  `PlayerSettingsFragment.SettingsView`
  Interface for views that can be reset to their default values.

  ## 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
  `static final long`
  `MAX_RATE_LIMIT_BPS`
  Maximum allowed rate limit in bits per second
  `static final long`
  `MIN_RATE_LIMIT_BPS`
  Minimum allowed rate limit in bits per second
  `static final String`
  `PREFS_BACK_BUFFER_DURATION`
  Key for back buffer duration setting
  `static final String`
  `PREFS_CLIP_END`
  Key for clip end setting
  `static final String`
  `PREFS_CLIP_START`
  Key for clip start setting
  `static final String`
  `PREFS_DEGRADATION_PENALTY`
  Key for degradation penalty setting
  `static final String`
  `PREFS_DEGRADATION_RECOVERY`
  Key for degradation recovery setting
  `static final String`
  `PREFS_DEGRADATION_SAMPLES`
  Key for degradation samples setting
  `static final String`
  `PREFS_DRAIN_WHILE_CHARGING`
  Key for drain while charging setting
  `static final String`
  `PREFS_KEY_ALGO`
  Key for ABR algorithm setting
  `static final String`
  `PREFS_KEY_BANDWIDTH_FRACTION`
  Key for bandwidth fraction setting
  `static final String`
  `PREFS_KEY_BUFFER_SIZE_BYTES`
  Key for buffer size in bytes setting
  `static final String`
  `PREFS_KEY_BUFFER_SIZE_MAX_TIME`
  Key for maximum buffer size time setting
  `static final String`
  `PREFS_KEY_BUFFER_SIZE_MIN_TIME`
  Key for minimum buffer size time setting
  `static final String`
  `PREFS_KEY_DOWNLOAD_TIME_FACTOR`
  Key for download time factor setting
  `static final String`
  `PREFS_KEY_INITIAL_BANDWIDTH`
  Key for initial bandwidth setting
  `static final String`
  `PREFS_KEY_MAX_DECREASE`
  Key for maximum decrease setting
  `static final String`
  `PREFS_KEY_MIN_INCREASE`
  Key for minimum increase setting
  `static final String`
  `PREFS_KEY_RATELIMIT`
  Key for rate limit setting
  `static final String`
  `PREFS_KEY_RETAIN`
  Key for retain buffer setting
  `static final String`
  `PREFS_KEY_SAFE_BUFFER`
  Key for safe buffer setting
  `static final String`
  `PREFS_MIN_RESTART_BUFFER`
  Key for minimum restart buffer setting
  `static final String`
  `PREFS_MIN_START_BUFFER`
  Key for minimum start buffer setting
  `static final String`
  `PREFS_PERCENTILE_WEIGHT`
  Key for percentile weight setting
  `static final String`
  `PREFS_STORE_NAME`
  Name of the SharedPreferences store for ABR settings
  `static final String`
  `PREFS_TIME_OVER_MEMORY`
  Key for time over memory setting

  ### Fields inherited from class androidx.fragment.app.Fragment

  `mPreviousWho`

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `PlayerSettingsFragment()`
  Constructor for PlayerSettingsFragment.

- ## Method Summary

  Modifier and Type
  Method
  Description
  `void`
  `onAttach(Context context)`
  `View`
  `onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState)`
  `void`
  `reset()`
  Reset the config views and load their value from the current preferences or defaults

  ### Methods inherited from class androidx.fragment.app.Fragment

  `dump, equals, getActivity, getAllowEnterTransitionOverlap, getAllowReturnTransitionOverlap, getArguments, getChildFragmentManager, getContext, getDefaultViewModelCreationExtras, 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, onActivityCreated, onActivityResult, onAttach, onAttachFragment, onConfigurationChanged, onContextItemSelected, onCreate, onCreateAnimation, onCreateAnimator, onCreateContextMenu, onCreateOptionsMenu, onDestroy, onDestroyOptionsMenu, onDestroyView, onDetach, onGetLayoutInflater, onHiddenChanged, onInflate, onInflate, onLowMemory, onMultiWindowModeChanged, onOptionsItemSelected, onOptionsMenuClosed, onPause, onPictureInPictureModeChanged, onPrepareOptionsMenu, onPrimaryNavigationFragmentChanged, onRequestPermissionsResult, onResume, onSaveInstanceState, onStart, onStop, onViewCreated, onViewStateRestored, 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

  `getClass, notify, notifyAll, wait, wait, wait`

- ## Field Details

  - ### PREFS_STORE_NAME

    public static final String PREFS_STORE_NAME
    Name of the SharedPreferences store for ABR settings
    See Also:
      - Constant Field Values

  - ### PREFS_KEY_RATELIMIT

    public static final String PREFS_KEY_RATELIMIT
    Key for rate limit setting
    See Also:
      - Constant Field Values

  - ### PREFS_KEY_INITIAL_BANDWIDTH

    public static final String PREFS_KEY_INITIAL_BANDWIDTH
    Key for initial bandwidth setting
    See Also:
      - Constant Field Values

  - ### PREFS_KEY_MIN_INCREASE

    public static final String PREFS_KEY_MIN_INCREASE
    Key for minimum increase setting
    See Also:
      - Constant Field Values

  - ### PREFS_KEY_MAX_DECREASE

    public static final String PREFS_KEY_MAX_DECREASE
    Key for maximum decrease setting
    See Also:
      - Constant Field Values

  - ### PREFS_KEY_BANDWIDTH_FRACTION

    public static final String PREFS_KEY_BANDWIDTH_FRACTION
    Key for bandwidth fraction setting
    See Also:
      - Constant Field Values

  - ### PREFS_KEY_DOWNLOAD_TIME_FACTOR

    public static final String PREFS_KEY_DOWNLOAD_TIME_FACTOR
    Key for download time factor setting
    See Also:
      - Constant Field Values

  - ### PREFS_KEY_RETAIN

    public static final String PREFS_KEY_RETAIN
    Key for retain buffer setting
    See Also:
      - Constant Field Values

  - ### PREFS_KEY_SAFE_BUFFER

    public static final String PREFS_KEY_SAFE_BUFFER
    Key for safe buffer setting
    See Also:
      - Constant Field Values

  - ### PREFS_KEY_ALGO

    public static final String PREFS_KEY_ALGO
    Key for ABR algorithm setting
    See Also:
      - Constant Field Values

  - ### PREFS_KEY_BUFFER_SIZE_BYTES

    public static final String PREFS_KEY_BUFFER_SIZE_BYTES
    Key for buffer size in bytes setting
    See Also:
      - Constant Field Values

  - ### PREFS_KEY_BUFFER_SIZE_MIN_TIME

    public static final String PREFS_KEY_BUFFER_SIZE_MIN_TIME
    Key for minimum buffer size time setting
    See Also:
      - Constant Field Values

  - ### PREFS_KEY_BUFFER_SIZE_MAX_TIME

    public static final String PREFS_KEY_BUFFER_SIZE_MAX_TIME
    Key for maximum buffer size time setting
    See Also:
      - Constant Field Values

  - ### PREFS_DRAIN_WHILE_CHARGING

    public static final String PREFS_DRAIN_WHILE_CHARGING
    Key for drain while charging setting
    See Also:
      - Constant Field Values

  - ### PREFS_TIME_OVER_MEMORY

    public static final String PREFS_TIME_OVER_MEMORY
    Key for time over memory setting
    See Also:
      - Constant Field Values

  - ### PREFS_MIN_START_BUFFER

    public static final String PREFS_MIN_START_BUFFER
    Key for minimum start buffer setting
    See Also:
      - Constant Field Values

  - ### PREFS_MIN_RESTART_BUFFER

    public static final String PREFS_MIN_RESTART_BUFFER
    Key for minimum restart buffer setting
    See Also:
      - Constant Field Values

  - ### PREFS_BACK_BUFFER_DURATION

    public static final String PREFS_BACK_BUFFER_DURATION
    Key for back buffer duration setting
    See Also:
      - Constant Field Values

  - ### PREFS_CLIP_START

    public static final String PREFS_CLIP_START
    Key for clip start setting
    See Also:
      - Constant Field Values

  - ### PREFS_CLIP_END

    public static final String PREFS_CLIP_END
    Key for clip end setting
    See Also:
      - Constant Field Values

  - ### PREFS_PERCENTILE_WEIGHT

    public static final String PREFS_PERCENTILE_WEIGHT
    Key for percentile weight setting
    See Also:
      - Constant Field Values

  - ### PREFS_DEGRADATION_PENALTY

    public static final String PREFS_DEGRADATION_PENALTY
    Key for degradation penalty setting
    See Also:
      - Constant Field Values

  - ### PREFS_DEGRADATION_RECOVERY

    public static final String PREFS_DEGRADATION_RECOVERY
    Key for degradation recovery setting
    See Also:
      - Constant Field Values

  - ### PREFS_DEGRADATION_SAMPLES

    public static final String PREFS_DEGRADATION_SAMPLES
    Key for degradation samples setting
    See Also:
      - Constant Field Values

  - ### MIN_RATE_LIMIT_BPS

    public static final long MIN_RATE_LIMIT_BPS
    Minimum allowed rate limit in bits per second
    See Also:
      - Constant Field Values

  - ### MAX_RATE_LIMIT_BPS

    public static final long MAX_RATE_LIMIT_BPS
    Maximum allowed rate limit in bits per second
    See Also:
      - Constant Field Values

- ## Constructor Details

  - ### PlayerSettingsFragment

    public PlayerSettingsFragment()
    Constructor for PlayerSettingsFragment.

- ## Method Details

  - ### onAttach

    public void onAttach(Context context)
    Overrides:
      `onAttach` in class `androidx.fragment.app.Fragment`

  - ### onCreateView

    @Nullable public View onCreateView(@NonNull LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState)
    Overrides:
      `onCreateView` in class `androidx.fragment.app.Fragment`

  - ### reset

    public void reset()
    Reset the config views and load their value from the current preferences or defaults