com.aliyun.svideosdk.editor

## Interface AliyunIPlayerController

-     public interface AliyunIPlayerController

  The player interface for editing video files.

  Added in v3.27.0

- - ### Method Summary

    All Methods Instance Methods Abstract Methods
    Modifier and Type | Method and Description
    --- | ---
    `long` | `getCurrentPlayPosition()` Gets the current position on the playback timeline.
    `long` | `getCurrentStreamPosition()` Gets the current position on the stream timeline.
    `long` | `getDuration()` Gets the duration of the playback timeline.
    `long` | `getStreamDuration()` Gets the duration of the video stream.
    `boolean` | `isMute()` Gets whether playback is muted.
    `boolean` | `isPaused()` Gets whether playback is paused.
    `boolean` | `isPlaying()`
    `int` | `pause()` Pauses playback.
    `int` | `play()` Starts playback.
    `int` | `replay()` Restarts playback.
    `int` | `resume()` Resumes playback.
    `int` | `seek(long time, java.util.concurrent.TimeUnit timeUnit)` Seeks to a point in time.
    `void` | `setMute(boolean mute)` Mutes or unmutes playback.
    `int` | `setVolume(int volume)` Sets volume.
    `int` | `stop()` Stops playback.

- - ### Method Detail

    - #### play

          int play()

      Starts playback.
      Returns:
        `AliyunErrorCode.ERROR_TRES_ILLEGAL_EDITOR_STATE` `AliyunEditorErrorCode.SVIDEO_EDITOR_NATIVE_NOT_INITED` `AliyunEditorErrorCode.SVIDEO_EDITOR_INVALID_STATE` `AliyunEditorErrorCode.SVIDEO_EDITOR_START_ERROR`

    - #### pause

          int pause()

      Pauses playback.
      Returns:
        `AliyunErrorCode.ERROR_TRES_ILLEGAL_EDITOR_STATE` `AliyunEditorErrorCode.SVIDEO_EDITOR_NATIVE_NOT_INITED` `AliyunEditorErrorCode.SVIDEO_EDITOR_INVALID_STATE` `AliyunEditorErrorCode.SVIDEO_EDITOR_PAUSE_ERROR`

    - #### resume

          int resume()

      Resumes playback.
      Returns:
        `AliyunErrorCode.ERROR_TRES_ILLEGAL_EDITOR_STATE` `AliyunEditorErrorCode.SVIDEO_EDITOR_NATIVE_NOT_INITED` `AliyunEditorErrorCode.SVIDEO_EDITOR_INVALID_STATE` `AliyunEditorErrorCode.SVIDEO_EDITOR_START_ERROR`

    - #### stop

          int stop()

      Stops playback.
      Returns:
        `AliyunErrorCode.ERROR_TRES_ILLEGAL_EDITOR_STATE` `AliyunEditorErrorCode.SVIDEO_EDITOR_NATIVE_NOT_INITED` `AliyunEditorErrorCode.SVIDEO_EDITOR_INVALID_STATE` `AliyunEditorErrorCode.SVIDEO_EDITOR_STOP_ERROR`

    - #### replay

          int replay()

      Restarts playback.
      Returns:
        `AliyunErrorCode.ERROR_TRES_ILLEGAL_EDITOR_STATE` `AliyunEditorErrorCode.SVIDEO_EDITOR_NATIVE_NOT_INITED` `AliyunEditorErrorCode.SVIDEO_EDITOR_INVALID_STATE` `AliyunEditorErrorCode.SVIDEO_EDITOR_START_ERROR`

    - #### seek

          int seek(long time,
                   java.util.concurrent.TimeUnit timeUnit)

      Seeks to a point in time.
      Parameters:
        `time` - The point in time.
      Returns:
        `AliyunErrorCode.ERROR_TRES_ILLEGAL_EDITOR_STATE` `AliyunEditorErrorCode.SVIDEO_EDITOR_NATIVE_NOT_INITED` `AliyunEditorErrorCode.SVIDEO_EDITOR_INVALID_STATE` `AliyunEditorErrorCode.SVIDEO_EDITOR_SEEK_IN_OFFSET` `AliyunEditorErrorCode.SVIDEO_EDITOR_SEEK_ERROR` `AliyunEditorErrorCode.ALIVC_FRAMEWORK_AUDIO_PROCESS_SEEK_FAILED`

    - #### getCurrentStreamPosition

          long getCurrentStreamPosition()

      Gets the current position on the stream timeline. This position is not subject to timeline effects.
      Returns:
        The current position on the stream timeline. Unit: milliseconds.

    - #### getCurrentPlayPosition

          long getCurrentPlayPosition()

      Gets the current position on the playback timeline. This position is subject to timeline effects.
      Returns:
        The current position on the playback timeline. Unit: milliseconds.

    - #### getStreamDuration

          long getStreamDuration()

      Gets the duration of the video stream.
      Returns:
        The duration of the video stream. Unit: milliseconds.

    - #### getDuration

          long getDuration()

      Gets the duration of the playback timeline.
      Returns:
        The duration of the playback timeline. Unit: milliseconds.

    - #### isPlaying

          boolean isPlaying()

    - #### isPaused

          boolean isPaused()

      Gets whether playback is paused.

    - #### isMute

          boolean isMute()

      Gets whether playback is muted.
      Returns:
        A value of true indicates muted. A value of false indicates unmuted.

    - #### setMute

          void setMute(boolean mute)

      Mutes or unmutes playback.
      Parameters:
        `mute` - A value of true indicates mute playback. A value of false indicates unmute playback.

    - #### setVolume

          int setVolume(int volume)

      Sets volume.
      Parameters:
        `volume` - Valid values: [0, 100]. 0 indicates muted. 100 indicates the maximum volume. Default is 50.
      Returns:
        `AliyunErrorCode.ERROR_TRES_ILLEGAL_EDITOR_STATE` `AliyunEditorErrorCode.SVIDEO_EDITOR_NATIVE_NOT_INITED` `AliyunEditorErrorCode.SVIDEO_EDITOR_INVALID_STATE` `AliyunEditorErrorCode.ALIVC_FRAMEWORK_AUDIO_PROCESS_CTL_INPUT_ERROR`