Interface SessionCallbackBuilder.SkipCallback

  • Enclosing class:
    SessionCallbackBuilder

    public static interface SessionCallbackBuilder.SkipCallback
    Callback receiving skip backward and skip forward.
    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      int onSkipBackward​(androidx.media2.session.MediaSession session, androidx.media2.session.MediaSession.ControllerInfo controllerInfo)
      Called when the specified controller has sent skip backward.
      int onSkipForward​(androidx.media2.session.MediaSession session, androidx.media2.session.MediaSession.ControllerInfo controllerInfo)
      Called when the specified controller has sent skip forward.
    • Method Detail

      • onSkipBackward

        int onSkipBackward​(androidx.media2.session.MediaSession session,
                           androidx.media2.session.MediaSession.ControllerInfo controllerInfo)
        Called when the specified controller has sent skip backward.
        Parameters:
        session - The media session.
        controllerInfo - The MediaSession.ControllerInfo for the controller that has requested to skip backward.
        Returns:
        One of the SessionResult RESULT_* constants describing the success or failure of the operation, for example, SessionResult.RESULT_SUCCESS if the operation succeeded.
        See Also:
        MediaSession.SessionCallback.onSkipBackward(MediaSession, MediaSession.ControllerInfo), MediaController.skipBackward()
      • onSkipForward

        int onSkipForward​(androidx.media2.session.MediaSession session,
                          androidx.media2.session.MediaSession.ControllerInfo controllerInfo)
        Called when the specified controller has sent skip forward.
        Parameters:
        session - The media session.
        controllerInfo - The MediaSession.ControllerInfo for the controller that has requested to skip forward.
        Returns:
        One of the SessionResult RESULT_* constants describing the success or failure of the operation, for example, SessionResult.RESULT_SUCCESS if the operation succeeded.
        See Also:
        MediaSession.SessionCallback.onSkipForward(MediaSession, MediaSession.ControllerInfo), MediaController.skipForward()