Agora Java API Reference for Android

Public Member Functions | List of all members
agora::rtc::IMediaStreamingSourceObserver Class Referenceabstract

This observer interface of media streaming source. More...

`#include <IAgoraMediaStreamingSource.h>`

## Public Member Functions
virtual void | onStateChanged (STREAMING_SRC_STATE state, STREAMING_SRC_ERR err_code)=0
| Reports the playback state change. When the state of the playback changes, the SDK triggers this callback to report the new playback state and the reason or error for the change. More...
virtual void | onOpenDone (STREAMING_SRC_ERR err_code)=0
| Triggered when file is opened. More...
virtual void | onSeekDone (STREAMING_SRC_ERR err_code)=0
| Triggered when seeking is done. More...
virtual void | onEofOnce (int64_t progress_ms, int64_t repeat_count)=0
| Triggered when playing is EOF. More...
virtual void | onProgress (int64_t position_ms)=0
| Reports current playback progress. The callback triggered once every one second during the playing status. More...
virtual void | onMetaData (const void *data, int length)=0
| Occurs when the metadata is received. The callback occurs when the player receives the media metadata and reports the detailed information of the media metadata. More...

## Detailed Description

This observer interface of media streaming source.

Deprecated:
  Since version 4.6.0, this feature has been turned off by default.

## Member Function Documentation

## ◆ onStateChanged()

virtual void agora::rtc::IMediaStreamingSourceObserver::onStateChanged | ( | STREAMING_SRC_STATE | state,
|  | STREAMING_SRC_ERR | err_code
| ) |  |
| pure virtual

Reports the playback state change. When the state of the playback changes, the SDK triggers this callback to report the new playback state and the reason or error for the change.

Parameters

  state | The new playback state after change. See STREAMING_SRC_STATE.
  ec | The player's error code. See STREAMINGSRC_ERR.

## ◆ onOpenDone()

virtual void agora::rtc::IMediaStreamingSourceObserver::onOpenDone | ( | STREAMING_SRC_ERR | err_code | ) |
| pure virtual

Triggered when file is opened.

Parameters

  err_code | The error code

Returns
  None

## ◆ onSeekDone()

virtual void agora::rtc::IMediaStreamingSourceObserver::onSeekDone | ( | STREAMING_SRC_ERR | err_code | ) |
| pure virtual

Triggered when seeking is done.

Parameters

  err_code | The error code

Returns
  None

## ◆ onEofOnce()

virtual void agora::rtc::IMediaStreamingSourceObserver::onEofOnce | ( | int64_t | progress_ms,
|  | int64_t | repeat_count
| ) |  |
| pure virtual

Triggered when playing is EOF.

Parameters

  progress_ms | the progress position
  repeat_count | means repeated count of playing

## ◆ onProgress()

virtual void agora::rtc::IMediaStreamingSourceObserver::onProgress | ( | int64_t | position_ms | ) |
| pure virtual

Reports current playback progress. The callback triggered once every one second during the playing status.

Parameters

  position_ms | Current playback progress (millisecond).

## ◆ onMetaData()

virtual void agora::rtc::IMediaStreamingSourceObserver::onMetaData | ( | const void * | data,
|  | int | length
| ) |  |
| pure virtual

Occurs when the metadata is received. The callback occurs when the player receives the media metadata and reports the detailed information of the media metadata.

Parameters

  data | The detailed data of the media metadata.
  length | The data length (bytes).