Interface PlaybackSettings
-
- All Implemented Interfaces:
public interface PlaybackSettings
The playback settings.
-
-
Method Summary
Modifier and Type Method Description abstract void
useFastStartup(boolean useFastStartup)
The player starts the playback as soon as the first video data is available related to the initial playback position. abstract void
setDecoderSelectionHelper(@Nullable() DecoderSelectionHelper decoderSelectionHelper)
This helper manages whether the specified codec is usable for decoding on the current device. abstract String
getDecoderName(DecoderType decoderType, String mimeType, boolean secure)
Returns the decoder name that would be selected for a media with the specified properties. -
-
Method Detail
-
useFastStartup
abstract void useFastStartup(boolean useFastStartup)
The player starts the playback as soon as the first video data is available related to the initial playback position.
- Using this feature will sacrifice the accuracy of the initial seek position
- This API is in an experimental stage and may be subject to breaking changes.
- Parameters:
useFastStartup
- Whether fast startup is enabled.
-
setDecoderSelectionHelper
abstract void setDecoderSelectionHelper(@Nullable() DecoderSelectionHelper decoderSelectionHelper)
This helper manages whether the specified codec is usable for decoding on the current device.
- The player by default always tries to use the preferred decoder by the device.
- In some cases these decoders are not the best for certain playback use-cases, so this methods gives the decoder selection logic into your hands.
- This is a global setting for all player instances. Strongly suggest you to only flip this flag when it is really needed, per device basis.
- This API is in an experimental stage and may be subject to breaking changes.
- Parameters:
decoderSelectionHelper
- the helper that decides based on the decoder name if it can be used on the device.
-
getDecoderName
@Nullable() abstract String getDecoderName(DecoderType decoderType, String mimeType, boolean secure)
Returns the decoder name that would be selected for a media with the specified properties.
- Will return null if there is no supported decoder.
- Parameters:
decoderType
- The decoder type, weather it's a Video or an Audio.mimeType
- The mimeType of the media.secure
- Whether the media is DRM protected or not.- Returns:
The decoder name to be used for the specified media. (Nullable)
-
-
-
-