Class MediaControllerConfig.Builder

  • Enclosing class:
    MediaControllerConfig

    public static class MediaControllerConfig.Builder
    extends java.lang.Object
    The MediaControllerConfig Builder.
    • Constructor Detail

      • Builder

        public Builder()
        Instantiates a new MediaControllerConfig.Builder.
    • Method Detail

      • setOnTouchListener

        public MediaControllerConfig.Builder setOnTouchListener​(@Nullable
                                                                android.view.View.OnTouchListener onTouchListener)
        Sets on touch listener.

        The default value is null, which will be ignored by the BrightcoveMediaController.

        Parameters:
        onTouchListener - the on touch listener
        Returns:
        the builder instance
      • setInitialPlayheadPosition

        public MediaControllerConfig.Builder setInitialPlayheadPosition​(long initialPlayheadPosition)
        Sets the initial playhead position value in milliseconds.

        The playhead position might later be updated by another component or an event. For example, by the EventType.PROGRESS or the EventType.VIDEO_DURATION_CHANGED events.

        The default value is -1, which will be ignored by the BrightcoveMediaController.

        Parameters:
        initialPlayheadPosition - the initial playhead position value in milliseconds
        Returns:
        the builder instance
      • setShowControlsOnCreation

        public MediaControllerConfig.Builder setShowControlsOnCreation​(boolean showControlsOnCreation)
        Sets whether the Media Controller will be shown when the controller is created. The Default value is true.
        Parameters:
        showControlsOnCreation - true to show the controller when it is created.
        Returns:
        the builder instance
      • setShowControlsWhenAdIsPlaying

        public MediaControllerConfig.Builder setShowControlsWhenAdIsPlaying​(boolean showControlsWhenAdIsPlaying)
        Sets whether the Media Controller will be allowed to be shown when an Ad is playing. The Default value is false.
        Parameters:
        showControlsWhenAdIsPlaying - true to show the controller when an Ad is playing.
        Returns:
        the builder instance
      • build

        public MediaControllerConfig build()
        Builds the MediaControllerConfig.
        Returns:
        the media controller config