Builder
This is the builder class for ArcMediaPlayerConfig objects.
Constructors
Functions
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” } }
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.
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.
Turn on enhanced logging that will show up in the logcat log.
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.
Sets the parent activity for the player. This method must be called.
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.
Determines if the player controls show automatically when playback ends.
Automatically start playing the video after it becomes ready. Default value is true.
Sets the cast manager for enabling Chromecast.
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.
Enable client side ad reporting.
Enable client side ad reporting.
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.
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
set this to true when you do not want any error message overlay to appear on video default is false
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.
/** Place focus on the skip button when it is shown during skippable ads. This is for Google IMA ads only. */
Disable showing the player controls when the user touches the screen. This will require the user to handle video player touches.
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.
Sets the preferred stream type to play when there are multiple types returned in an ArcVideoStream object.
Make the server call to enable server side ads. Will only work with ArcVideoStream objects that have ads enabled.
Make the server call to enable server side ads. Will only work with ArcVideoStream objects that have ads enabled.
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.
Start the video muted. Default is false.
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.
Sets the ArcVideoFrame object for the player. This method must be called.
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.
Show or hide the closed caption button on the player control bar. Default is false.
Show or hide the countdown text on the video progress bar on the player control bar.
Show or hide the player video progress bar including the countdown text on the player control bar.
Show or hide the rewind and fast forward buttons on the player control bar.
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.