Builder

class Builder

This is the builder class for ArcMediaPlayerConfig objects.

Constructors

Link copied to clipboard
fun Builder()

Functions

Link copied to clipboard
fun addAdParam(key: String, val: String): ArcXPVideoConfig.Builder

Add a single ad parameter to be sent to MediaTailor. Multiple calls to this method can be made. This method takes a key and a value and will be added to the call as a JSON entry of the format { “adParams” : { “key1”: “value1”, “key2”: “value2” } }

Link copied to clipboard
fun addOverlay(tag: String, overlay: View): ArcXPVideoConfig.Builder

This method takes a tag name for the view as well as the view. The client app will still have a pointer to the overlays so they can then control the visibility or other parameters of the views from within the client code. This method can be called multiple times in order to add multiple overlays.

Link copied to clipboard
fun addViewToHide(view: View?): ArcXPVideoConfig.Builder

This is a variable size list of views that will be hidden when PIP occurs. All views that are visible on the screen with the exception of the ArcVideoFrame should be listed here. The views in this list will be set to GONE when PIP occurs so that only the video frame is showing.

Link copied to clipboard
fun build(): ArcXPVideoConfig
Link copied to clipboard
fun enableLogging(): ArcXPVideoConfig.Builder

Turn on enhanced logging that will show up in the logcat log.

Link copied to clipboard
fun enableOpenMeasurement(enable: Boolean): ArcXPVideoConfig.Builder
Link copied to clipboard
fun enablePAL(enable: Boolean): ArcXPVideoConfig.Builder
Link copied to clipboard
fun enablePip(enable: Boolean): ArcXPVideoConfig.Builder

Enable picture-in-picture(PIP). If it is on then the video controls will have a pip menu button. PIP will occur when the button is pressed or the user presses the back button while a video is playing.

Link copied to clipboard
fun setActivity(activity: Activity?): ArcXPVideoConfig.Builder
fun setActivity(activity: AppCompatActivity?): ArcXPVideoConfig.Builder

Sets the parent activity for the player. This method must be called.

Link copied to clipboard
fun setAdConfig(adconfig: AdConfig?): ArcXPVideoConfig.Builder
Link copied to clipboard
fun setAdConfigUrl(url: String?): ArcXPVideoConfig.Builder
Link copied to clipboard
fun setAdsEnabled(enable: Boolean): ArcXPVideoConfig.Builder

This flag indicates if ads should not be shown as part of the video content. This is for Google IMA ads only. Default value = false.

Link copied to clipboard
fun setAdUrl(url: String?): ArcXPVideoConfig.Builder
Link copied to clipboard
fun setArtWorkUrl(url: String): ArcXPVideoConfig.Builder
Link copied to clipboard
fun setAutoShowControls(show: Boolean): ArcXPVideoConfig.Builder

Determines if the player controls show automatically when playback ends.

Link copied to clipboard
fun setAutoStartPlay(play: Boolean): ArcXPVideoConfig.Builder

Automatically start playing the video after it becomes ready. Default value is true.

Link copied to clipboard
fun setCastManager(arcCastManager: ArcCastManager?): ArcXPVideoConfig.Builder

Sets the cast manager for enabling Chromecast.

Link copied to clipboard

CCStartMode has the following values: ON - Closed Captioning is on by default but can be turned off. OFF - Closed Captioning is off by default but can be turned on. DEFAULT - Closed Captioning follows the Captioning Service setting of the device. Works for Android 19 and above only.

Link copied to clipboard
fun setClientSideAds(set: Boolean): ArcXPVideoConfig.Builder

Enable client side ad reporting.

Link copied to clipboard
fun setClientSideAdsEnabled(set: Boolean): ArcXPVideoConfig.Builder

Enable client side ad reporting.

Link copied to clipboard
fun setControlsShowTimeoutMs(ms: Int): ArcXPVideoConfig.Builder

Set the amount of time the player controls are shown before disappearing. Setting this to 0 or lower will cause the controls to always be displayed.

Link copied to clipboard
fun setDisableControls(disable: Boolean): ArcXPVideoConfig.Builder

set this to true when you do not want any playback controls to appear at any time this disables all the button listeners and should not display controls ever default is false

Link copied to clipboard
fun setDisableErrorOverlay(disable: Boolean): ArcXPVideoConfig.Builder

set this to true when you do not want any error message overlay to appear on video default is false

Link copied to clipboard
fun setEnableAds(enable: Boolean): ArcXPVideoConfig.Builder

This flag indicates if ads should not be shown as part of the video content. This is for Google IMA ads only. Default value = false.

Link copied to clipboard
fun setFocusSkipButton(focus: Boolean): ArcXPVideoConfig.Builder

/** Place focus on the skip button when it is shown during skippable ads. This is for Google IMA ads only. */

Link copied to clipboard
fun setHideControlsToggleWithTouch(disable: Boolean): ArcXPVideoConfig.Builder

Disable showing the player controls when the user touches the screen. This will require the user to handle video player touches.

Link copied to clipboard
fun setKeepControlsSpaceOnHide(keep: Boolean): ArcXPVideoConfig.Builder
Link copied to clipboard
fun setMaxBitRate(rate: Int): ArcXPVideoConfig.Builder

The maximum bit rate of the video to play when there are multiple streams to choose from. This is used in conjunction with the setPreferredStreamType() method.

Link copied to clipboard
fun setOmidPartnerName(name: String): ArcXPVideoConfig.Builder
Link copied to clipboard
fun setOmidPpid(ppid: String): ArcXPVideoConfig.Builder
Link copied to clipboard
fun setOmidVersionName(name: String): ArcXPVideoConfig.Builder
Link copied to clipboard
fun setPalPartnerName(name: String): ArcXPVideoConfig.Builder
Link copied to clipboard
fun setPalPpid(ppid: String): ArcXPVideoConfig.Builder
Link copied to clipboard
fun setPalVersionName(name: String): ArcXPVideoConfig.Builder
Link copied to clipboard

Sets the preferred stream type to play when there are multiple types returned in an ArcVideoStream object.

Link copied to clipboard
fun setServerSideAds(set: Boolean): ArcXPVideoConfig.Builder

Make the server call to enable server side ads. Will only work with ArcVideoStream objects that have ads enabled.

Link copied to clipboard
fun setServerSideAdsEnabled(set: Boolean): ArcXPVideoConfig.Builder

Make the server call to enable server side ads. Will only work with ArcVideoStream objects that have ads enabled.

Link copied to clipboard
fun setShouldDisableNextButton(value: Boolean): ArcXPVideoConfig.Builder
Link copied to clipboard
fun setShouldDisablePreviousButton(value: Boolean): ArcXPVideoConfig.Builder
Link copied to clipboard
fun setShouldShowFullScreenButton(shouldShowFullScreenButton: Boolean): ArcXPVideoConfig.Builder
Link copied to clipboard
fun setShouldShowTitleOnControls(shouldShowTitleOnControls: Boolean): ArcXPVideoConfig.Builder
Link copied to clipboard
fun setShouldShowVolumeButton(showVolumeButton: Boolean): ArcXPVideoConfig.Builder
Link copied to clipboard

If true then the track selection dialog will be shown that allows the user to select the closed captioning track. If false then the CC button will toggle between off and the default CC track.

Link copied to clipboard
fun setShowNextPreviousButtons(value: Boolean): ArcXPVideoConfig.Builder
Link copied to clipboard
fun setStartMuted(muted: Boolean): ArcXPVideoConfig.Builder

Start the video muted. Default is false.

Link copied to clipboard
fun setUserAgent(agent: String): ArcXPVideoConfig.Builder

The string that is used as the User-Agent key that can be attached to the header of the call to enable server side ads.

Link copied to clipboard
fun setVideoFrame(videoFrame: ArcVideoFrame?): ArcXPVideoConfig.Builder

Sets the ArcVideoFrame object for the player. This method must be called.

Link copied to clipboard
Link copied to clipboard
fun setViewsToHide(vararg views: View?): ArcXPVideoConfig.Builder

This is a variable size list of views that will be hidden when PIP occurs. All views that are visible on the screen with the exception of the ArcVideoFrame should be listed here. The views in this list will be set to GONE when PIP occurs so that only the video frame is showing.

Link copied to clipboard
fun showClosedCaption(enable: Boolean): ArcXPVideoConfig.Builder

Show or hide the closed caption button on the player control bar. Default is false.

Link copied to clipboard
fun showCountdown(show: Boolean): ArcXPVideoConfig.Builder

Show or hide the countdown text on the video progress bar on the player control bar.

Link copied to clipboard
fun showProgressBar(show: Boolean): ArcXPVideoConfig.Builder

Show or hide the player video progress bar including the countdown text on the player control bar.

Link copied to clipboard
fun showSeekButton(show: Boolean): ArcXPVideoConfig.Builder

Show or hide the rewind and fast forward buttons on the player control bar.

Link copied to clipboard
fun useDialogForFullscreen(use: Boolean): ArcXPVideoConfig.Builder

Fullscreen can be displayed in two different ways, as a dialog or by expanding the layout_height and layout_width parameters of the ArcVideoFrame to match_parent. This method determines if the dialog should be used. Default setting is false. If your layout has the ArcVideoFrame element a direct child of the root view then setting this to false will work because the frame will expand to the full size of the screen. If your layout has the ArcVideoFrame as a child of a view that is not the root view and that parent is not the full size of the screen then you should use a dialog because expanding the height and width of the video frame will not take up the whole screen.