Class SeekButtonController

    • Field Detail

      • DEFAULT_SEEK_PERCENTAGE

        protected static final int DEFAULT_SEEK_PERCENTAGE
        See Also:
        Constant Field Values
      • DEFAULT_ON_HOLD_START_TIME

        protected static final int DEFAULT_ON_HOLD_START_TIME
        See Also:
        Constant Field Values
      • DEFAULT_ON_HOLD_UPDATE_FREQUENCY

        protected static final int DEFAULT_ON_HOLD_UPDATE_FREQUENCY
        See Also:
        Constant Field Values
      • seekDefault

        @Deprecated
        protected int seekDefault
        Deprecated.
        The default amount of time (milliseconds) the seek button will skip.
      • seekDefaultLong

        protected long seekDefaultLong
        The default amount of time (milliseconds) the seek button will skip.
      • seekStartPosition

        @Deprecated
        protected int seekStartPosition
        Deprecated.
        The start playhead position for the last seek operation.
      • seekStartPositionLong

        protected long seekStartPositionLong
        The start playhead position for the last seek operation.
      • seekTargetPosition

        @Deprecated
        protected int seekTargetPosition
        Deprecated.
        The target playhead position for the last seek operation.
      • seekTargetPositionLong

        protected long seekTargetPositionLong
        The target playhead position for the last seek operation.
      • seekPercentage

        protected int seekPercentage
        The percentage number used to calculate the seekDefault based on the video duration. Default value is DEFAULT_SEEK_PERCENTAGE.
      • onHoldWaitTime

        protected int onHoldWaitTime
        The time in milliseconds to be waited, for the key event to be considered a long press instead of a regular press. Default value is DEFAULT_ON_HOLD_START_TIME.
    • Constructor Detail

      • SeekButtonController

        public SeekButtonController​(@NonNull
                                    android.content.Context context,
                                    @NonNull
                                    BaseVideoView videoView,
                                    @NonNull
                                    android.view.View controlBar,
                                    int id,
                                    @Nullable
                                    android.graphics.Typeface font,
                                    java.lang.String eventType)
        Builds a button controller to handle the rewind button.
        Parameters:
        context - The Android application context.
        videoView - The SDK video view object parenting the control bar.
        controlBar - The button widget parent view.
        font - The, possibly null, typeface for the button.
    • Method Detail

      • getSeekDefault

        @Deprecated
        public int getSeekDefault()
        Deprecated.
        Deprecated. Instead use {getSeekDefaultLong()}
      • getSeekDefaultLong

        public long getSeekDefaultLong()
        Gets default seek time.
        Returns:
        the seek time in milliseconds
      • setSeekDefault

        @Deprecated
        public void setSeekDefault​(int value)
        Deprecated.
        Deprecated. Instead use {setSeekDefault(long)}
      • setSeekDefault

        public void setSeekDefault​(long value)
        Sets the default seek time.
        Parameters:
        value - The number of milliseconds to seek.
      • getSeekPercentage

        public int getSeekPercentage()
        Gets the seek percentage relative to video duration, used to set the seekDefaultLong The values are greater than 0 and lower than 100
        Returns:
        the seek percentage
      • setSeekPercentage

        public void setSeekPercentage​(int seekPercentage)
        Sets the seek percentage relative to video duration, used to set the seekDefaultLong The values are greater than 0 and lower than 100
        Parameters:
        seekPercentage - the seek percentage
      • getOnHoldWaitTime

        public int getOnHoldWaitTime()
        Gets the on hold button wait time, which is the time in milliseconds to be waited, so that the key event is considered a long press instead of a regular press.
        Returns:
        the on hold start time
      • setOnHoldWaitTime

        public void setOnHoldWaitTime​(int onHoldWaitTime)
        Sets the on hold button wait time, which is the time in milliseconds to be waited, so that the key event is considered a long press instead of a regular press.
        Parameters:
        onHoldWaitTime - the on hold start time
      • getOnHoldUpdateFrequency

        public int getOnHoldUpdateFrequency()
        Gets the on hold update frequency time in milliseconds, used to send the EventType.SEEKBAR_DRAGGING_PROGRESS event to update the Media Controller seek bar.
        Returns:
        the time in milliseconds
      • setOnHoldUpdateFrequency

        public void setOnHoldUpdateFrequency​(int onHoldUpdateFrequency)
        Sets the on hold update frequency time in milliseconds, used to send the EventType.SEEKBAR_DRAGGING_PROGRESS event to update the Media Controller seek bar.
        Parameters:
        onHoldUpdateFrequency - the time in milliseconds
      • handleSeekEvent

        protected boolean handleSeekEvent​(android.view.KeyEvent event)
      • computeTargetSeekPosition

        @Deprecated
        protected abstract int computeTargetSeekPosition​(int seekStartPosition,
                                                         int offset)
        Deprecated.
        Compute the target seek position based on the seekStartPosition and an offset. The offset can be overridden by calling the setSeekDefault(long) The default offset for a Live video is LIVE_OFFSET
        Parameters:
        seekStartPosition - the seek start position
        offset - the amount of time in milliseconds to seek.
        Returns:
        the int position in the video to seek to.
        See Also:
        setSeekDefault(long)
      • computeTargetSeekPosition

        protected abstract long computeTargetSeekPosition​(long seekStartPosition,
                                                          long offset)
        Compute the target seek position based on the seekStartPosition and an offset. The offset can be overridden by calling the setSeekDefault(long) The default offset for a Live video is LIVE_OFFSET
        Parameters:
        seekStartPosition - the seek start position
        offset - the amount of time in milliseconds to seek.
        Returns:
        the int position in the video to seek to.
        See Also:
        setSeekDefault(long)
      • getDidSeekHandler

        protected abstract EventListener getDidSeekHandler()
        Gets the EventListener callback to trigger when the DID_SEEK_TO event is received.
        Returns:
        EventListener who listens for DID_SEEK_TO