Package com.castlabs.android.player
Class PlayerConfig.Builder
- java.lang.Object
-
- com.castlabs.android.player.PlayerConfig.Builder
-
- Enclosing class:
- PlayerConfig
public static final class PlayerConfig.Builder extends Object
A Builder forPlayerConfig.
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description PlayerConfig.BuilderabrConfiguration(AbrConfiguration abrConfiguration)Sets theAbrConfigurationPlayerConfig.BuilderadRequest(AdRequest adRequest)Sets theAdRequestPlayerConfig.BuilderadSchedule(AdSchedule adSchedule)Set the AdSchedulePlayerConfig.BuilderanalyticsMetaData(AnalyticsMetaData analyticsMetaData)Set the analytics meta-dataPlayerConfig.BuilderanalyticsSessionType(int analyticsSessionType)Sets the type of analytics sessionPlayerConfig.BuilderaudioAttributes(AudioAttributes audioAttributes)Set the AudioAttributesPlayerConfig.BuilderaudioCodec(String codecName)Sets the preferred audio codec for all audio types.PlayerConfig.BuilderaudioDecoderFallback(boolean value)If true (default), allows the player to fallback to other decoders if it failed to initialize the primary decoder.PlayerConfig.BuilderaudioTrackGroupIndex(int audioTrackGroupIndex)Sets the audio track group indexPlayerConfig.BuilderaudioTrackIndex(int audioTrackIndex)Sets the audio track indexPlayerConfig.BuilderautoPlay(boolean autoPlay)Sets whether to start playing once enough buffer is availablePlayerConfig.BuilderbufferConfiguration(BufferConfiguration bufferConfiguration)Sets theBufferConfigurationPlayerConfig.BuildercasConfiguration(CasConfiguration casConfiguration)Sets theCasConfigurationPlayerConfig.BuilderclipPeriods(boolean clipPeriods)Sets whether to clip periods to their durations (DASH-only) May be necessary when the segments durations are longer than the periods or the segments durations are not-aligned, so the periods should be clipped to periods durations and don't render the segments leftovers.PlayerConfig.BuilderclippingEndUs(long clippingEndUs)Sets the clipping start position in microsecondsPlayerConfig.BuilderclippingStartUs(long clippingStartUs)Sets the clipping start position in microsecondsPlayerConfig.BuilderconfigurationUrl(String configurationUrl)Sets the configuration urlPlayerConfig.BuildercontentParameters(Bundle contentParameters)Sets the manifest header parametersPlayerConfig.BuildercontentQueryParameters(Bundle contentQueryParameters)Sets the segment query parametersPlayerConfig.BuildercontentType(int contentType)Sets the content typePlayerConfig.BuildercontentUrl(String contentUrl)Sets the content url.PlayerConfig.BuilderdownloadFolder(String downloadFolder)Sets the download folderPlayerConfig.BuilderdrmConfiguration(DrmConfiguration drmConfiguration)Sets theDrmConfigurationPlayerConfig.BuilderenableAdSpeedUp(boolean enableAdSpeedUp)Sets the flag to enable or disable automatic setting of a speed to 1x when playing ads.PlayerConfig.BuilderenableDashEventCallback(boolean enableDashEventCallback)Whether to enable internal handling of DASH event callbacksPlayerConfig.BuilderenableLooping(boolean enableLooping)If set to true then the playback looping will be enabled and the player will automatically restart the playback after reaching end of contentPlayerConfig.BuilderenableTrickplayMode(boolean enableTrickplayMode)Whether to enable Trickplay playback on start or notPlayerConfig.BuilderenableTunneling(boolean enableTunneling)Sets whether to enable tunnelingPlayerConfig.BuilderenableTunnelingWithoutAudio(boolean enableTunnelingWithoutAudio)Sets whether to force tunneling with only video track present.PlayerConfig.BuilderenableWorkaroundEveryVideoFrameIsSyncFrame(boolean enableWorkaroundEveryVideoFrameIsSyncFrame)Sets whether to enable or disable the workaround whether all video frames are marked as sync frames but should not be treated as sync frames except the very first in a segment (DASH-only).PlayerConfig.BuilderforceInStreamDrmInitData(boolean forceInStreamDrmInitData)Sets whether to use DRM init data coming from segments or from the manifest (DASH-only).PlayerConfig.BuilderfromBundle(Bundle bundle)Sets theBuilderfields according to the stored keys in the givenBundle.PlayerConfig.BuilderfromConfig(PlayerConfig config)Sets theBuilderfields according to the values from the givenPlayerConfigPlayerConfigget()Builds the PlayerConfig objectPlayerConfig.Builderid(String id)Sets the configuration idPlayerConfig.Builderlive(boolean live)Sets whether this is live contentPlayerConfig.BuilderliveConfiguration(LiveConfiguration liveConfiguration)Sets theLiveConfigurationPlayerConfig.BuildermediaCodecInfos(ArrayList<MediaCodecInfo> mediaCodecInfos)Sets the preferred codecs for specified mimetypes.PlayerConfig.BuildermergeVideoTracks(boolean mergeVideoTracks)Sets whether to merge video tracksPlayerConfig.BuildermetaData(JSONObject metaData)Sets the JSON metadataPlayerConfig.BuildernetworkConfiguration(NetworkConfiguration networkConfiguration)Sets theNetworkConfigurationPlayerConfig.BuilderpauseOnHdmiDisconnected(boolean pauseOnHdmiDisconnected)Enable or disable automatic playback pause on HDMI disconnect Only for API higher or equal to 21PlayerConfig.BuilderpositionUs(long positionUs)Sets the position in microsecondsPlayerConfig.BuilderpreferredAudioLanguage(String preferredAudioLanguage)Sets the preferred audio languagePlayerConfig.BuilderpreferredTextLanguage(String preferredTextLanguage)Sets the preferred text languagePlayerConfig.BuilderpreservePlayerViewSurface(boolean preservePlayerViewSurface)If set to true and thePlayerViewis used, the playback surface be kept on screen and preserved when the player player is released.PlayerConfig.BuilderpushBlackScreenOnDispose(boolean pushBlackScreenOnDispose)If set to true andpreservePlayerViewSurfaceis enabled, indicates that the decoder should push a black screen to the surface when disposed.PlayerConfig.BuilderrestoreSpeed(boolean restoreSpeed)Sets the flag to enable or disable automatic restoring of a speed after playing ads.PlayerConfig.BuildersegmentParameters(Bundle segmentParameters)Sets the segment header parametersPlayerConfig.BuildersegmentQueryParameters(Bundle segmentQueryParameters)Sets the segment query parametersPlayerConfig.BuildersideloadedTracks(ArrayList<SideloadedTrack> sideloadedTracks)Sets the sideloaded tracksPlayerConfig.BuildersubtitlesTrackGroupIndex(int subtitlesTrackGroupIndex)Sets the subtitles track group indexPlayerConfig.BuildersubtitlesTrackIndex(int subtitlesTrackIndex)Sets the subtitles track indexPlayerConfig.Builderthreesixty(boolean threesixty)Sets whether this is 360 contentPlayerConfig.BuildertrickplayConfiguration(TrickplayConfiguration trickplayConfiguration)Sets theTrickplayConfigurationstatic ObjecttypeCheck(Object value, Class<?> type, Object defaultValue, String errorMessage)Helper function that we use to type check the value extracted from a bundlePlayerConfig.BuilderunsecureDecoderFallback(boolean value)If true (default), allows the player to fallback to unsecure decoders if it failed to initialize the primary decoder.PlayerConfig.BuilderuseEth0(boolean useEth0)If set to true then the SDK if IPTV is used, eth0 will be used for multicast for multicast receptionPlayerConfig.BuilderuserID(String userID)Sets the user IDPlayerConfig.BuilderuseStandaloneMediaClock(boolean useStandaloneMediaClock)If set to true, will use Exoplayer'sStandaloneMediaClockinstead of the Renderer Clock.PlayerConfig.BuildervideoCodec(String codecName)Sets the preferred video codec for all video types.PlayerConfig.BuildervideoCodecFilter(int videoCodecFilter)Sets the type of video codec filterPlayerConfig.BuildervideoDecoderFallback(boolean value)If true (default), allows the player to fallback to other decoders if it failed to initialize the primary decoder.PlayerConfig.BuildervideoFilterConfiguration(VideoFilterConfiguration videoFilterConfiguration)Set the VideoFilterConfigurationPlayerConfig.BuildervideoSizeFilter(Point videoSizeFilter)Deprecated.PlayerConfig.BuildervideoTrackGroupIndex(int videoTrackGroupIndex)Sets the video track group indexPlayerConfig.Buildervolume(float volume)Sets the volume.
-
-
-
Constructor Detail
-
Builder
public Builder(@NonNull String url)- Parameters:
url- content url
-
Builder
public Builder(@NonNull Bundle bundle)- Parameters:
bundle- a Bundle where to copy values from.
-
Builder
public Builder(@NonNull PlayerConfig config)- Parameters:
config- an existing PlayerConfig where to copy values from.
-
-
Method Detail
-
typeCheck
public static Object typeCheck(@Nullable Object value, @NonNull Class<?> type, @Nullable Object defaultValue, @NonNull String errorMessage) throws IllegalArgumentException
Helper function that we use to type check the value extracted from a bundle- Parameters:
value- the valuetype- the expected typedefaultValue- the default valueerrorMessage- the error message- Returns:
- the value in case the type check passed
- Throws:
IllegalArgumentException- in case the type check fails
-
fromBundle
public PlayerConfig.Builder fromBundle(@NonNull Bundle bundle)
Sets theBuilderfields according to the stored keys in the givenBundle.- Parameters:
bundle- the Bundle where to get the values from- Returns:
- the Builder
-
fromConfig
public PlayerConfig.Builder fromConfig(@NonNull PlayerConfig config)
Sets theBuilderfields according to the values from the givenPlayerConfig- Parameters:
config- the PlayerConfig from which to read the values.- Returns:
- the Builder
-
positionUs
public PlayerConfig.Builder positionUs(long positionUs)
Sets the position in microseconds- Parameters:
positionUs- the value- Returns:
- the Builder
-
clippingStartUs
public PlayerConfig.Builder clippingStartUs(long clippingStartUs)
Sets the clipping start position in microseconds- Parameters:
clippingStartUs- the value- Returns:
- the Builder
-
clippingEndUs
public PlayerConfig.Builder clippingEndUs(long clippingEndUs)
Sets the clipping start position in microseconds- Parameters:
clippingEndUs- the value- Returns:
- the Builder
-
subtitlesTrackGroupIndex
public PlayerConfig.Builder subtitlesTrackGroupIndex(int subtitlesTrackGroupIndex)
Sets the subtitles track group index- Parameters:
subtitlesTrackGroupIndex- the value- Returns:
- the Builder
-
subtitlesTrackIndex
public PlayerConfig.Builder subtitlesTrackIndex(int subtitlesTrackIndex)
Sets the subtitles track index- Parameters:
subtitlesTrackIndex- the value- Returns:
- the Builder
-
audioTrackGroupIndex
public PlayerConfig.Builder audioTrackGroupIndex(int audioTrackGroupIndex)
Sets the audio track group index- Parameters:
audioTrackGroupIndex- the value- Returns:
- the Builder
-
audioTrackIndex
public PlayerConfig.Builder audioTrackIndex(int audioTrackIndex)
Sets the audio track index- Parameters:
audioTrackIndex- the value- Returns:
- the Builder
-
volume
public PlayerConfig.Builder volume(float volume)
Sets the volume. 1 is the maximum, and 0 the minimum.- Parameters:
volume- the value- Returns:
- the Builder
-
pauseOnHdmiDisconnected
public PlayerConfig.Builder pauseOnHdmiDisconnected(boolean pauseOnHdmiDisconnected)
Enable or disable automatic playback pause on HDMI disconnect Only for API higher or equal to 21- Parameters:
pauseOnHdmiDisconnected- the value- Returns:
- the Builder
-
videoTrackGroupIndex
public PlayerConfig.Builder videoTrackGroupIndex(int videoTrackGroupIndex)
Sets the video track group index- Parameters:
videoTrackGroupIndex- the value- Returns:
- the Builder
-
abrConfiguration
public PlayerConfig.Builder abrConfiguration(AbrConfiguration abrConfiguration)
Sets theAbrConfiguration- Parameters:
abrConfiguration- the value- Returns:
- the Builder
-
bufferConfiguration
public PlayerConfig.Builder bufferConfiguration(BufferConfiguration bufferConfiguration)
Sets theBufferConfiguration- Parameters:
bufferConfiguration- the value- Returns:
- the Builder
-
mergeVideoTracks
public PlayerConfig.Builder mergeVideoTracks(boolean mergeVideoTracks)
Sets whether to merge video tracks- Parameters:
mergeVideoTracks- the value- Returns:
- the Builder
-
clipPeriods
public PlayerConfig.Builder clipPeriods(boolean clipPeriods)
Sets whether to clip periods to their durations (DASH-only) May be necessary when the segments durations are longer than the periods or the segments durations are not-aligned, so the periods should be clipped to periods durations and don't render the segments leftovers. Default isPlayerSDK.CLIP_PERIODS- Parameters:
clipPeriods- the value- Returns:
- the Builder
-
forceInStreamDrmInitData
public PlayerConfig.Builder forceInStreamDrmInitData(boolean forceInStreamDrmInitData)
Sets whether to use DRM init data coming from segments or from the manifest (DASH-only). The flag does not affect key pre-fetch and initialization data. Set it to true when a key is changed in a segment and not in the manifest Default isPlayerSDK.FORCE_IN_STREAM_DRM_INIT_DATA- Parameters:
forceInStreamDrmInitData- the value- Returns:
- the Builder
-
enableWorkaroundEveryVideoFrameIsSyncFrame
public PlayerConfig.Builder enableWorkaroundEveryVideoFrameIsSyncFrame(boolean enableWorkaroundEveryVideoFrameIsSyncFrame)
Sets whether to enable or disable the workaround whether all video frames are marked as sync frames but should not be treated as sync frames except the very first in a segment (DASH-only). Default isPlayerSDK.ENABLE_WORKAROUND_EVERY_VIDEO_FRAME_IS_SYNC_FRAME- Parameters:
enableWorkaroundEveryVideoFrameIsSyncFrame- the value- Returns:
- the Builder
-
videoCodecFilter
public PlayerConfig.Builder videoCodecFilter(int videoCodecFilter)
Sets the type of video codec filter- Parameters:
videoCodecFilter- the value- Returns:
- the Builder
-
mediaCodecInfos
public PlayerConfig.Builder mediaCodecInfos(ArrayList<MediaCodecInfo> mediaCodecInfos)
Sets the preferred codecs for specified mimetypes. In case the specified codec does not present on the system then the setting is ignored- Parameters:
mediaCodecInfos- the value- Returns:
- the Builder
-
videoCodec
public PlayerConfig.Builder videoCodec(@Nullable String codecName)
Sets the preferred video codec for all video types. To set preferred video codec for specific mimetype, usemediaCodecInfos(ArrayList). In case the specified codec does not present on the system then the setting is ignored- Parameters:
codecName- the codec name as registered in the system e.g. "OMX.google.h264.decoder"- Returns:
- the Builder
-
audioCodec
public PlayerConfig.Builder audioCodec(@Nullable String codecName)
Sets the preferred audio codec for all audio types. To set preferred audio codec for specific mimetype, usemediaCodecInfos(ArrayList). In case the specified codec does not present on the system then the setting is ignored- Parameters:
codecName- the codec name as registred in the system e.g. "OMX.google.h264.decoder"- Returns:
- the Builder
-
videoSizeFilter
public PlayerConfig.Builder videoSizeFilter(Point videoSizeFilter)
Deprecated.Sets the video size filter- Parameters:
videoSizeFilter- the value- Returns:
- the Builder
-
downloadFolder
public PlayerConfig.Builder downloadFolder(String downloadFolder)
Sets the download folder- Parameters:
downloadFolder- the value- Returns:
- the Builder
-
enableTunneling
public PlayerConfig.Builder enableTunneling(boolean enableTunneling)
Sets whether to enable tunneling- Parameters:
enableTunneling- the value- Returns:
- the Builder
-
enableTunnelingWithoutAudio
public PlayerConfig.Builder enableTunnelingWithoutAudio(boolean enableTunnelingWithoutAudio)
Sets whether to force tunneling with only video track present. To take effect theenableTunneling(boolean)should also be on.- Parameters:
enableTunnelingWithoutAudio- the value- Returns:
- the Builder
-
analyticsSessionType
public PlayerConfig.Builder analyticsSessionType(int analyticsSessionType)
Sets the type of analytics session- Parameters:
analyticsSessionType- the value- Returns:
- the Builder
-
userID
public PlayerConfig.Builder userID(String userID)
Sets the user ID- Parameters:
userID- the value- Returns:
- the Builder
-
liveConfiguration
public PlayerConfig.Builder liveConfiguration(LiveConfiguration liveConfiguration)
Sets theLiveConfiguration- Parameters:
liveConfiguration- the value- Returns:
- the Builder
-
networkConfiguration
public PlayerConfig.Builder networkConfiguration(NetworkConfiguration networkConfiguration)
Sets theNetworkConfiguration- Parameters:
networkConfiguration- the value- Returns:
- the Builder
-
trickplayConfiguration
public PlayerConfig.Builder trickplayConfiguration(TrickplayConfiguration trickplayConfiguration)
Sets theTrickplayConfiguration- Parameters:
trickplayConfiguration- the value- Returns:
- the Builder
-
enableTrickplayMode
public PlayerConfig.Builder enableTrickplayMode(boolean enableTrickplayMode)
Whether to enable Trickplay playback on start or not- Parameters:
enableTrickplayMode- whether to enable Trickplay playback on start or not- Returns:
- the Builder
-
enableDashEventCallback
public PlayerConfig.Builder enableDashEventCallback(boolean enableDashEventCallback)
Whether to enable internal handling of DASH event callbacks- Parameters:
enableDashEventCallback- whether to enable internal handling of DASH event callback- Returns:
- the Builder
-
adRequest
public PlayerConfig.Builder adRequest(AdRequest adRequest)
Sets theAdRequest- Parameters:
adRequest- the value- Returns:
- the Builder
-
enableAdSpeedUp
public PlayerConfig.Builder enableAdSpeedUp(boolean enableAdSpeedUp)
Sets the flag to enable or disable automatic setting of a speed to 1x when playing ads.- Parameters:
enableAdSpeedUp- The flag- Returns:
- the Builder
-
restoreSpeed
public PlayerConfig.Builder restoreSpeed(boolean restoreSpeed)
Sets the flag to enable or disable automatic restoring of a speed after playing ads.- Parameters:
restoreSpeed- The flag- Returns:
- the Builder
-
configurationUrl
public PlayerConfig.Builder configurationUrl(String configurationUrl)
Sets the configuration url- Parameters:
configurationUrl- the value- Returns:
- the Builder
-
id
public PlayerConfig.Builder id(String id)
Sets the configuration id- Parameters:
id- the value- Returns:
- the Builder
-
contentUrl
public PlayerConfig.Builder contentUrl(@NonNull String contentUrl)
Sets the content url. This is the only mandatory param- Parameters:
contentUrl- the value. Cannot be null or empty.- Returns:
- the Builder
-
contentType
public PlayerConfig.Builder contentType(int contentType)
Sets the content type- Parameters:
contentType- the value- Returns:
- the Builder
-
autoPlay
public PlayerConfig.Builder autoPlay(boolean autoPlay)
Sets whether to start playing once enough buffer is available- Parameters:
autoPlay- the value- Returns:
- the Builder
-
live
public PlayerConfig.Builder live(boolean live)
Sets whether this is live content- Parameters:
live- the value- Returns:
- the Builder
-
threesixty
public PlayerConfig.Builder threesixty(boolean threesixty)
Sets whether this is 360 content- Parameters:
threesixty- the value- Returns:
- the Builder
-
preferredTextLanguage
public PlayerConfig.Builder preferredTextLanguage(String preferredTextLanguage)
Sets the preferred text language- Parameters:
preferredTextLanguage- the value- Returns:
- the Builder
-
preferredAudioLanguage
public PlayerConfig.Builder preferredAudioLanguage(String preferredAudioLanguage)
Sets the preferred audio language- Parameters:
preferredAudioLanguage- the value- Returns:
- the Builder
-
sideloadedTracks
public PlayerConfig.Builder sideloadedTracks(ArrayList<SideloadedTrack> sideloadedTracks)
Sets the sideloaded tracks- Parameters:
sideloadedTracks- the value- Returns:
- the Builder
-
metaData
public PlayerConfig.Builder metaData(JSONObject metaData)
Sets the JSON metadata- Parameters:
metaData- the value- Returns:
- the Builder
-
contentParameters
public PlayerConfig.Builder contentParameters(Bundle contentParameters)
Sets the manifest header parameters- Parameters:
contentParameters- the value- Returns:
- the Builder
-
segmentParameters
public PlayerConfig.Builder segmentParameters(Bundle segmentParameters)
Sets the segment header parameters- Parameters:
segmentParameters- the value- Returns:
- the Builder
-
segmentQueryParameters
public PlayerConfig.Builder segmentQueryParameters(Bundle segmentQueryParameters)
Sets the segment query parameters- Parameters:
segmentQueryParameters- the value- Returns:
- the Builder
-
contentQueryParameters
public PlayerConfig.Builder contentQueryParameters(Bundle contentQueryParameters)
Sets the segment query parameters- Parameters:
contentQueryParameters- the value- Returns:
- the Builder
-
drmConfiguration
public PlayerConfig.Builder drmConfiguration(DrmConfiguration drmConfiguration)
Sets theDrmConfiguration- Parameters:
drmConfiguration- the value- Returns:
- the Builder
-
casConfiguration
public PlayerConfig.Builder casConfiguration(CasConfiguration casConfiguration)
Sets theCasConfiguration- Parameters:
casConfiguration- the value- Returns:
- the Builder
-
preservePlayerViewSurface
public PlayerConfig.Builder preservePlayerViewSurface(boolean preservePlayerViewSurface)
If set to true and thePlayerViewis used, the playback surface be kept on screen and preserved when the player player is released. This allows to reuse (instead of re-create) the playback surface and can also be used to keep the last frame on screen even if the underlying player was already released.- Parameters:
preservePlayerViewSurface- The value- Returns:
- The Builder
-
pushBlackScreenOnDispose
public PlayerConfig.Builder pushBlackScreenOnDispose(boolean pushBlackScreenOnDispose)
If set to true andpreservePlayerViewSurfaceis enabled, indicates that the decoder should push a black screen to the surface when disposed.- Parameters:
pushBlackScreenOnDispose- The value- Returns:
- The Builder
-
useStandaloneMediaClock
public PlayerConfig.Builder useStandaloneMediaClock(boolean useStandaloneMediaClock)
If set to true, will use Exoplayer'sStandaloneMediaClockinstead of the Renderer Clock.There's a known issue when using
SingleControllerPlaylistin conjunction with Audio Tracks which don't span the entire media duration. With the default Renderer Clock this provokes a freeze when the Audio Track ends.- Parameters:
useStandaloneMediaClock- The value- Returns:
- The Builder
-
enableLooping
public PlayerConfig.Builder enableLooping(boolean enableLooping)
If set to true then the playback looping will be enabled and the player will automatically restart the playback after reaching end of content- Parameters:
enableLooping- The value- Returns:
- The Builder
-
analyticsMetaData
public PlayerConfig.Builder analyticsMetaData(AnalyticsMetaData analyticsMetaData)
Set the analytics meta-data- Parameters:
analyticsMetaData- The analytics meta-data- Returns:
- The builder
-
audioAttributes
public PlayerConfig.Builder audioAttributes(AudioAttributes audioAttributes)
Set the AudioAttributes- Parameters:
audioAttributes- The audio attributes- Returns:
- The builder
-
adSchedule
public PlayerConfig.Builder adSchedule(AdSchedule adSchedule)
Set the AdSchedule- Parameters:
adSchedule- The ad schedule- Returns:
- The builder
-
videoFilterConfiguration
public PlayerConfig.Builder videoFilterConfiguration(VideoFilterConfiguration videoFilterConfiguration)
Set the VideoFilterConfiguration- Parameters:
videoFilterConfiguration- The VideoFilterConfiguration- Returns:
- The builder
-
useEth0
public PlayerConfig.Builder useEth0(boolean useEth0)
If set to true then the SDK if IPTV is used, eth0 will be used for multicast for multicast reception- Parameters:
useEth0- The value- Returns:
- The Builder
-
videoDecoderFallback
public PlayerConfig.Builder videoDecoderFallback(boolean value)
If true (default), allows the player to fallback to other decoders if it failed to initialize the primary decoder. This can for instance happen if the primary decoder is a hardware implementation and is already blocked by another playback session. In that case, secondary decoders, i.e. software implementations, will be used if possible.- Parameters:
value- The value- Returns:
- The builder
-
audioDecoderFallback
public PlayerConfig.Builder audioDecoderFallback(boolean value)
If true (default), allows the player to fallback to other decoders if it failed to initialize the primary decoder. This can for instance happen if the primary decoder is a hardware implementation and is already blocked by another playback session. In that case, secondary decoders, i.e. software implementations, will be used if possible.- Parameters:
value- The value- Returns:
- The builder
-
unsecureDecoderFallback
public PlayerConfig.Builder unsecureDecoderFallback(boolean value)
If true (default), allows the player to fallback to unsecure decoders if it failed to initialize the primary decoder. This requiresvideoDecoderFallback(boolean))} to be enabled.- Parameters:
value- The value- Returns:
- The builder
-
get
public PlayerConfig get()
Builds the PlayerConfig object- Returns:
- the PlayerConfig object
-
-