PlaybackProperties
Encapsulates all the configurable properties applicable for playback. All the properties have recommended default values that are suitable for most cases.
Constructors
The PlaybackProperties instance with provided values.
Types
Default values of PlaybackProperties. Most values match ExoPlayer's version 2.18.4 default values.
Properties
Force enables/Disables the player handling of Media Codec in asynchronous mode and also enables/disables submission of buffers to the MediaCodec on a separate thread from the player. Default value is null i.e. the Android system determines whether the playback needs async codec processing or not. NOTE: This property can only be applied to runtime where android.os.Build.VERSION.SDK_INT>= 23
Is auto play enabled for playback. Default value is Boolean.false.
: if application attempts to play multiple players simultaneously, playback may pause due to loss of audio focus. To prevent this, set the handleAudioFocus parameter to false for multiple players. For single-player scenarios, ensure handleAudioFocus is set to true.
The initial start time (if any) for playback in milliseconds. By default, the playback starts from the beginning for VOD content and the live edge for Live content.
LiveStreamMonitorConfiguration The configuration for the live stream monitoring logic. NOTE: This property is only used when monitorLiveStream is set to Boolean.true.
An array of values from PlaybackStateCompat.Actions that are to be allowed externally via Android's MediaSession API i.e. not via the FL Player. Ex: Using Google Assistant voice commands. Default value is SUPPORTED_PLAYBACK_ACTIONS. Send an empty array to not allow any action. Any unsupported playback action will be ignored.
Is monitoring, of live stream, required to prevent the player from falling behind the media window and trying to request a media segment that is no longer available. Default value is Boolean.false.
Enables/Disables the monitoring of VFPO. Default value is Boolean.false.
The duration of media to retain in the buffer prior to the current playback position, for fast backward seeking. The default is DEFAULT_BACK_BUFFER_DURATION_MS.
The fraction of the available bandwidth that the selection should consider available for use. Setting to a value less than 1 is recommended to account for inaccuracies in the bandwidth estimator. Default value is 0.7F.
The default duration of media that must be buffered for playback to resume after a rebuffer, in milliseconds. A rebuffer is defined to be caused by buffer depletion rather than a user action. Default value is 5000.
For live streaming, the fraction of the duration from current playback position to the live edge that has to be buffered before the selected track can be switched to one of higher quality. This parameter is only applied when the playback position is closer to the live edge than preferredMinDurationForQualityIncreaseMs, which would otherwise prevent switching to a higher quality from happening.
The maximum duration the player tries to buffer else throws a timeout error, in milliseconds. This handle's the indefinite buffering on playback.
The duration for which the player tries to connect to the network before throwing a SocketTimeoutException. Default value is 8000.
Sets the maximum playback speed that should be used if no maximum playback speed is defined by the media. The default is DEFAULT_FALLBACK_MAX_PLAYBACK_SPEED.
Sets the minimum playback speed that should be used if no minimum playback speed is defined by the media. The default is DEFAULT_FALLBACK_MIN_PLAYBACK_SPEED.
The default duration of media that must be buffered for playback to start or resume following a user action such as a seek, in milliseconds. Default value is 2500.
Represents initial network bandwidth, in bits per second, that the player will attempt to use on startup for the optimal track variant selection.
The maximum bitrate in bits per second that the player will consider for adaptive streaming track selection on startup. Default value is null, indicating no specific maximum constraint.
The default maximum duration of media that the player will attempt to buffer, in milliseconds. Default value is 50000.
The maximum duration of buffered data required for the selected track to switch to one of lower quality. Default value is 25_000.
The maximum number of times that the playback recovery flow will attempt to load the Player to recover from non-fatal error prior to propagating the error by calling Player.Listener.onError. The default value is DEFAULT_MAX_PLAYBACK_RECOVERY_RETRY_COUNT
The maximum playback speed, the player can use to catch up when trying to reach the target live offset. Default value is null, indicating the player defined maximum playback speed will be used.
The minimum bitrate in bits per second that the player will consider for adaptive streaming track selection on startup. Default value is null, indicating no specific minimum constraint.
The default minimum duration of media that the player will attempt to ensure is buffered at all times, in milliseconds. Default value is 50000.
The minimum duration of buffered data, in milliseconds, required for the selected track to switch to one of higher quality. Default value is 10_000.
When switching to a video track of higher quality, the selection may indicate that media already buffered at the lower quality can be discarded to speed up the switch. This is the minimum duration of media that must be retained at the lower quality. It must be at least minDurationForQualityIncreaseMs
. Default value is 25_000.
The minimum position to start the playback from. This is applicable only for a DASH live stream.
The default minimum number of times to retry loading data prior to propagating the error. Default value is 3.
The minimum playback speed, the player can use to fall back when trying to reach the target live offset. Default value is null, indicating the player defined minimum playback speed will be used.
The duration for which the player tries to read from the network before throwing a SocketTimeoutException. Default value is 8000.
Whether the back buffer is retained from the previous keyframe. If it's false then seeking in the back-buffer will only be fast if the back-buffer contains a keyframe prior to the seek position. The default is DEFAULT_RETAIN_BACK_BUFFER_FROM_KEYFRAME.
The seek back increment, in milliseconds.
The seek forward increment, in milliseconds.
Sets the increment applied to the target live offset each time the player is rebuffering, in milliseconds.
The target offset time from live edge in milliseconds. The player will attempt to get close to this live offset during playback. Default value is null, indicating the player calculated target offset time will be used.
, if application wants to stop the LIVE playback from the remote actions, set this flag to true. By default, it is false. NOTE: Currently is applicable for audio playback.
When enabled tunneled video playback makes it possible for AndroidTV device manufacturers to leverage hardware video decoding pipelines for playback. Default value is Boolean.false. NOTE: This property should be enabled only for the TV platform.
this property is applied only if monitorVFPO value is set to Boolean.true. The first value represents the lower boundary for the VFPO when we need to switch the video track variant to the next lower bitrate video variant. The second value represents the upper boundary for the VFPO when we need to switch the video track variant to the next higher bitrate video variant if the bitrate was caped previously. When monitorVFPO is set to false this property is not used. NOTE: VFPO (Video Frame Processing Offset Average) the metric to evaluate the rendering performance. VFPO measures how early the player processes a video frame compared to its presentation time, in microseconds. For example, if a video frame is processed by the player 30ms before the frame should be displayed on screen, the VFPO of this frame is 30000. Similarly, if a video frame is processed too late by 10ms (the player’s current position has progressed beyond the frame’s presentation time), the VFPO for this frame is -10000 (and the video frame is dropped). The smooth playback, without dropped frames or audio underruns, is expected when the average VFPO is above 40000. Video Frame Processing Offset Average is computed by taking a sum of VFPOs captured over a playback time period and dividing the sum by the number of VFPOs captured over the same time period. Default value is 15000L...40000L.