Class DefaultControlDispatcher

    • Field Detail

      • DEFAULT_FAST_FORWARD_MS

        public static final int DEFAULT_FAST_FORWARD_MS
        The default fast forward increment, in milliseconds.
        See Also:
        Constant Field Values
      • DEFAULT_REWIND_MS

        public static final int DEFAULT_REWIND_MS
        The default rewind increment, in milliseconds.
        See Also:
        Constant Field Values
    • Constructor Detail

      • DefaultControlDispatcher

        public DefaultControlDispatcher()
        Creates an instance.
      • DefaultControlDispatcher

        public DefaultControlDispatcher​(long fastForwardIncrementMs,
                                        long rewindIncrementMs)
        Creates an instance with the given increments.
        Parameters:
        fastForwardIncrementMs - The fast forward increment in milliseconds. A non-positive value disables the fast forward operation.
        rewindIncrementMs - The rewind increment in milliseconds. A non-positive value disables the rewind operation.
    • Method Detail

      • dispatchSeekTo

        public boolean dispatchSeekTo​(Player player,
                                      int windowIndex,
                                      long positionMs)
        Description copied from interface: ControlDispatcher
        Dispatches a Player.seekTo(int, long) operation.
        Specified by:
        dispatchSeekTo in interface ControlDispatcher
        Parameters:
        player - The Player to which the operation should be dispatched.
        windowIndex - The index of the window.
        positionMs - The seek position in the specified window, or C.TIME_UNSET to seek to the window's default position.
        Returns:
        True if the operation was dispatched. False if suppressed.
      • dispatchNext

        public boolean dispatchNext​(Player player)
        Description copied from interface: ControlDispatcher
        Dispatches a Player.next() operation.
        Specified by:
        dispatchNext in interface ControlDispatcher
        Parameters:
        player - The Player to which the operation should be dispatched.
        Returns:
        True if the operation was dispatched. False if suppressed.
      • dispatchRewind

        public boolean dispatchRewind​(Player player)
        Description copied from interface: ControlDispatcher
        Dispatches a rewind operation.
        Specified by:
        dispatchRewind in interface ControlDispatcher
        Parameters:
        player - The Player to which the operation should be dispatched.
        Returns:
        True if the operation was dispatched. False if suppressed.
      • dispatchFastForward

        public boolean dispatchFastForward​(Player player)
        Description copied from interface: ControlDispatcher
        Dispatches a fast forward operation.
        Specified by:
        dispatchFastForward in interface ControlDispatcher
        Parameters:
        player - The Player to which the operation should be dispatched.
        Returns:
        True if the operation was dispatched. False if suppressed.
      • dispatchStop

        public boolean dispatchStop​(Player player,
                                    boolean reset)
        Description copied from interface: ControlDispatcher
        Dispatches a Player.stop() operation.
        Specified by:
        dispatchStop in interface ControlDispatcher
        Parameters:
        player - The Player to which the operation should be dispatched.
        reset - Whether the player should be reset.
        Returns:
        True if the operation was dispatched. False if suppressed.
      • getRewindIncrementMs

        public long getRewindIncrementMs()
        Returns the rewind increment in milliseconds.
      • getFastForwardIncrementMs

        public long getFastForwardIncrementMs()
        Returns the fast forward increment in milliseconds.
      • setRewindIncrementMs

        @Deprecated
        public void setRewindIncrementMs​(long rewindMs)
        Deprecated.
        Create a new instance instead and pass the new instance to the UI component. This makes sure the UI gets updated and is in sync with the new values.
      • setFastForwardIncrementMs

        @Deprecated
        public void setFastForwardIncrementMs​(long fastForwardMs)
        Deprecated.
        Create a new instance instead and pass the new instance to the UI component. This makes sure the UI gets updated and is in sync with the new values.