Agora RTC Objective-C API Reference Refactor

Public Member Functions
IMediaStreamingSourceObserver Class Referenceabstract

## Public Member Functions
virtual void | onStateChanged (STREAMING_SRC_STATE state, STREAMING_SRC_ERR err_code)=0
virtual void | onOpenDone (STREAMING_SRC_ERR err_code)=0
virtual void | onSeekDone (STREAMING_SRC_ERR err_code)=0
virtual void | onEofOnce (int64_t progress_ms, int64_t repeat_count)=0
virtual void | onProgress (int64_t position_ms)=0
virtual void | onMetaData (const void *data, int length)=0

## Detailed Description

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

## Constructor & Destructor Documentation

## ◆ ~IMediaStreamingSourceObserver()

virtual ~IMediaStreamingSourceObserver | ( |  | ) |
| inline virtual

## Member Function Documentation

## ◆ onStateChanged()

virtual void 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 onOpenDone | ( | STREAMING_SRC_ERR | err_code | ) |
| pure virtual

Triggered when file is opened.

Parameters

  err_code | The error code

Returns
  None

## ◆ onSeekDone()

virtual void onSeekDone | ( | STREAMING_SRC_ERR | err_code | ) |
| pure virtual

Triggered when seeking is done.

Parameters

  err_code | The error code

Returns
  None

## ◆ onEofOnce()

virtual void 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 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 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).