io.agora.rtc

## Class AgoraMediaPlayerSource

- java.lang.Object
- - io.agora.rtc.AgoraMediaPlayerSource

-     public class AgoraMediaPlayerSource
      extends java.lang.Object

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `private IAgoraMediaPlayerSourceObserver` | `_AgoraMediaPlayerSourceObserver`
    `private IAudioFrameObserver` | `_AudioFrameObserver`
    `private long` | `cptr`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `AgoraMediaPlayerSource(long cptr)`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `destroy()`
    `void` | `destroyStreamInfo(MediaStreamInfo info)`
    `long` | `getDuration()`
    `long` | `getPlayPosition()`
    `int` | `getSourceId()`
    `int` | `getState()`
    `long` | `getStreamCount()`
    `MediaStreamInfo` | `getStreamInfo(long index)`
    `private void` | `ndestroy()`
    `int` | `open(java.lang.String url, long start_pos)`
    `int` | `pause()`
    `int` | `play()`
    `int` | `registerAudioFrameObserver(IAudioFrameObserver observer)`
    `int` | `registerPlayerSourceObserver(IAgoraMediaPlayerSourceObserver observer)`
    `int` | `resume()`
    `int` | `seek(long new_pos)`
    `int` | `selectAudioTrack(int index)`
    `int` | `selectInternalSubtitle(int index)`
    `int` | `setExternalSubtitle(java.lang.String url)`
    `int` | `setLoopCount(int loop_count)`
    `int` | `setPlayerOption(java.lang.String key, int value)`
    `int` | `stop()`
    `int` | `takeScreenshot(java.lang.String filename)`
    `int` | `unregisterAudioFrameObserver(IAudioFrameObserver observer)`
    `int` | `unregisterPlayerSourceObserver(IAgoraMediaPlayerSourceObserver observer)`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Field Detail

    - #### cptr

          private long cptr

    - #### _AgoraMediaPlayerSourceObserver

          private IAgoraMediaPlayerSourceObserver _AgoraMediaPlayerSourceObserver

    - #### _AudioFrameObserver

          private IAudioFrameObserver _AudioFrameObserver

  - ### Constructor Detail

    - #### AgoraMediaPlayerSource

          public AgoraMediaPlayerSource(long cptr)

  - ### Method Detail

    - #### ndestroy

          private void ndestroy()

    - #### destroy

          public void destroy()

    - #### getSourceId

          public int getSourceId()

    - #### open

          public int open(java.lang.String url,
                          long start_pos)

    - #### play

          public int play()

    - #### pause

          public int pause()

    - #### stop

          public int stop()

    - #### resume

          public int resume()

    - #### seek

          public int seek(long new_pos)

    - #### getDuration

          public long getDuration()

    - #### getPlayPosition

          public long getPlayPosition()

    - #### getStreamCount

          public long getStreamCount()

    - #### getStreamInfo

          public MediaStreamInfo getStreamInfo(long index)

    - #### destroyStreamInfo

          public void destroyStreamInfo(MediaStreamInfo info)

    - #### setLoopCount

          public int setLoopCount(int loop_count)

    - #### selectAudioTrack

          public int selectAudioTrack(int index)

    - #### setPlayerOption

          public int setPlayerOption(java.lang.String key,
                                     int value)

    - #### takeScreenshot

          public int takeScreenshot(java.lang.String filename)

    - #### selectInternalSubtitle

          public int selectInternalSubtitle(int index)

    - #### setExternalSubtitle

          public int setExternalSubtitle(java.lang.String url)

    - #### getState

          public int getState()

    - #### registerPlayerSourceObserver

          public int registerPlayerSourceObserver(IAgoraMediaPlayerSourceObserver observer)

    - #### unregisterPlayerSourceObserver

          public int unregisterPlayerSourceObserver(IAgoraMediaPlayerSourceObserver observer)

    - #### registerAudioFrameObserver

          public int registerAudioFrameObserver(IAudioFrameObserver observer)

    - #### unregisterAudioFrameObserver

          public int unregisterAudioFrameObserver(IAudioFrameObserver observer)