Class PlayerConfig

    • Field Detail

      • INTENT_CONFIGURATION_URL

        public static final String INTENT_CONFIGURATION_URL
        Intent key to specify an optional URL to an API endpoint that can be used to refresh the configuration.

        This is intended only informative purposes, no actual refreshing will be performed by the SDK.

        See Also:
        Constant Field Values
      • INTENT_CONFIGURATION_ID

        public static final String INTENT_CONFIGURATION_ID
        A unique ID for the configuration
        See Also:
        Constant Field Values
      • INTENT_METADATA

        public static final String INTENT_METADATA
        Additional JSON-formatted meta-data such as poster images, titles, byline and any custom meta-data
        See Also:
        Constant Field Values
      • INTENT_PREFERRED_CODEC_INFOS

        public static final String INTENT_PREFERRED_CODEC_INFOS
        Preferred media codec infos
        See Also:
        Constant Field Values
      • clippingStartUs

        public final long clippingStartUs
        The clipping start position in microseconds
      • clippingEndUs

        public final long clippingEndUs
        The clipping end position in microseconds
      • subtitlesTrackGroupIndex

        public final int subtitlesTrackGroupIndex
        The index of the selected subtitle track group or -1 for if subtitles are disabled
      • subtitlesTrackIndex

        public final int subtitlesTrackIndex
        The index of the selected subtitle track or -1 for if subtitles are disabled
      • audioTrackGroupIndex

        public final int audioTrackGroupIndex
        The index of the selected audio track group
      • audioTrackIndex

        public final int audioTrackIndex
        The index of the selected audio track
      • volume

        public final float volume
        The audio track volume
      • pauseOnHdmiDisconnected

        public final boolean pauseOnHdmiDisconnected
        Enable or disable automatic pausing on HDMI disconnected
      • videoTrackGroupIndex

        public final int videoTrackGroupIndex
        The index of the selected video track group
      • abrConfiguration

        public final AbrConfiguration abrConfiguration
        The initial video quality
      • bufferConfiguration

        public final BufferConfiguration bufferConfiguration
        The buffer configuration
      • liveConfiguration

        @Nullable
        public final LiveConfiguration liveConfiguration
        The Live configuration
      • networkConfiguration

        @NonNull
        public final NetworkConfiguration networkConfiguration
        The network configuration
      • trickplayConfiguration

        @NonNull
        public final TrickplayConfiguration trickplayConfiguration
        The Trickplay configuration
      • enableTrickplayMode

        public final boolean enableTrickplayMode
        Enable Trickplay mode at the start of the playback.
        See Also:
        trickplayConfiguration
      • enableDashEventCallback

        public final boolean enableDashEventCallback
        Enable internal handling of DASH event callbacks
      • mergeVideoTracks

        public final boolean mergeVideoTracks
        If True, the video tracks will be merged into a single video track
      • enableWorkaroundEveryVideoFrameIsSyncFrame

        public final boolean enableWorkaroundEveryVideoFrameIsSyncFrame
        If True, the workaround will be enabled to not treat the video frames as sync frames except the very first one. This flag may be needed to set up when the metadata of a video frame reports the video frame to be a sync frame (which is not in fact) but should not be treated as a sync frame by the decoder i.e. without the workaround the video artifacts appear upon every playback start and seek until the real key frame is rendered.
      • clipPeriods

        public final boolean clipPeriods
        If true then media periods will be clipped to their durations (currently is only applicable for DASH streams)
      • forceInStreamDrmInitData

        public final boolean forceInStreamDrmInitData
        If true then DRM init data from segments will be used instead of the one from manifest (currently is only applicable for DASH streams)
      • videoCodecFilter

        public final int videoCodecFilter
        The video codec filter
      • downloadFolder

        @Nullable
        public final String downloadFolder
        Download folder in case the content is played offline
      • enableTunneling

        public final boolean enableTunneling
        Enable tunneling support
      • enableTunnelingWithoutAudio

        public final boolean enableTunnelingWithoutAudio
        Force using of tunneling when audio track is disabled. To take effect the enableTunneling should also be on.
      • analyticsSessionType

        public final int analyticsSessionType
        Analytics session type
      • userID

        @Nullable
        public final String userID
        User ID. Unique identifier for the current user.
      • adRequest

        @Nullable
        public final AdRequest adRequest
        The Ad request (if any)
      • enableAdSpeedUp

        public final boolean enableAdSpeedUp
        The flag to enable or disable automatic setting of a speed to 1x when playing ads.
      • restoreSpeed

        public final boolean restoreSpeed
        The flag to enable or disable automatic restoring of a speed after playing ads.
      • configurationUrl

        @Nullable
        public final String configurationUrl
        Optional configuration backend url
      • id

        @NonNull
        public final String id
        ID for this content
      • contentUrl

        @NonNull
        public final String contentUrl
        Playback url
      • contentType

        public final int contentType
        The content format
      • autoPlay

        public final boolean autoPlay
        Whether to autoplay or not
      • live

        public final boolean live
        Content live or VoD
      • threesixty

        public final boolean threesixty
        360 support
      • preferredTextLanguage

        @Nullable
        public final String preferredTextLanguage
        Preferred subtitles language
      • preferredAudioLanguage

        @Nullable
        public final String preferredAudioLanguage
        Preferred audio language
      • sideloadedTracks

        @NonNull
        public final List<SideloadedTrack> sideloadedTracks
        Array of side-loaded tracks, either subtitles or thumbnails
      • metaData

        @Nullable
        public final JSONObject metaData
        Optional metadata
      • contentParameters

        @Nullable
        public final Bundle contentParameters
        Header params to add to content (manifest) requests
      • segmentParameters

        @Nullable
        public final Bundle segmentParameters
        Header params to add to segment requests
      • contentQueryParameters

        public final Bundle contentQueryParameters
        Query params to add to content (manifest) requests
      • segmentQueryParameters

        @Nullable
        public final Bundle segmentQueryParameters
        Query params to add to segment requests
      • drmConfiguration

        @Nullable
        public final DrmConfiguration drmConfiguration
        Drm configuration (if any)
      • casConfiguration

        @Nullable
        public final CasConfiguration casConfiguration
        Cas configuration (if any)
      • preservePlayerViewSurface

        public final boolean preservePlayerViewSurface
        If set to true and the PlayerView is 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.
      • pushBlackScreenOnDispose

        public final boolean pushBlackScreenOnDispose
        If true, indicates if the decoder should push a black screen to the surface when disposed. This is only relevant if you enabled preservePlayerViewSurface
      • useStandaloneMediaClock

        public boolean useStandaloneMediaClock
        If set to true, will use Exoplayer's StandaloneMediaClock instead of the Renderer Clock.
      • enableLooping

        public final 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
      • analyticsMetaData

        @Nullable
        public AnalyticsMetaData analyticsMetaData
        The analytics meta-data
      • adSchedule

        @Nullable
        public AdSchedule adSchedule
        Describes a custom ad schedule.
      • videoFilterConfiguration

        @NonNull
        public final VideoFilterConfiguration videoFilterConfiguration
        The video filter configuration
      • useEth0

        @Nullable
        public final boolean useEth0
        A boolean flag to indicate to use eth0 for multicast reception
      • videoDecoderFallback

        public final boolean videoDecoderFallback
        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.
      • audioDecoderFallback

        public final boolean audioDecoderFallback
        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.
      • unsecureDecoderFallback

        public final boolean unsecureDecoderFallback
        If true (default), allows the player to fallback to unsecure decoders if it failed to initialize the primary decoder. This requires videoDecoderFallback to also be enabled.
    • Method Detail

      • save

        public void save​(@NonNull
                         Bundle bundle)
        Saves the current configuration into a Bundle.
        Parameters:
        bundle - the Bundle to which store the PlayerConfig
      • toBundle

        public Bundle toBundle()
        Obtain a Bundle filled with key-value pairs representing the current configuration. This Bundle can be used to start playback on a PlayerController.
        Returns:
        the Bundle
      • buildUpon

        public PlayerConfig.Builder buildUpon()
        Set the Builder values to the stored values in the Bundle.
        Returns:
        the Builder
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class Object