Agora RTC Objective-C API Reference  Refactor
Data Structures | Enumerations
AgoraMediaPlayerKit.h File Reference

Go to the source code of this file.

Data Structures

protocol  <AgoraMediaPlayerDelegate>
 

Enumerations

enum  AgoraMediaPlayerState {
  AgoraMediaPlayerStateIdle = 0, AgoraMediaPlayerStateOpening = 1, AgoraMediaPlayerStateOpenCompleted = 2, AgoraMediaPlayerStatePlaying = 3,
  AgoraMediaPlayerStatePaused = 4, AgoraMediaPlayerStatePlayBackCompleted = 5, AgoraMediaPlayerStateStopped = 6, AgoraMediaPlayerStateFailed = 100
}
 
enum  AgoraMediaPlayerError {
  AgoraMediaPlayerErrorNone = 0, AgoraMediaPlayerErrorInvalidArguments = -1, AgoraMediaPlayerErrorInternal = -2, AgoraMediaPlayerErrorNoSource = -3,
  AgoraMediaPlayerErrorInvalidMediaSource = -4, AgoraMediaPlayerErrorUnknowStreamType = -5, AgoraMediaPlayerErrorObjNotInitialized = -6, AgoraMediaPlayerErrorCodecNotSupported = -7,
  AgoraMediaPlayerErrorVideoRenderFailed = -8, AgoraMediaPlayerErrorInvalidState = -9, AgoraMediaPlayerErrorUrlNotFound = -10, AgoraMediaPlayerErrorInvalidConnectState = -11,
  AgoraMediaPlayerErrorSrcBufferUnderflow = -12
}
 
enum  AgoraMediaPlayerEvent { AgoraMediaPlayerEventSeekBegin = 0, AgoraMediaPlayerEventSeekComplete = 1, AgoraMediaPlayerEventSeekError = 2 }
 
enum  AgoraMediaPlayerMetaDataType { AgoraMediaPlayerMetaDataTypeUnknown = 0, AgoraMediaPlayerMetaDataTypeSEI = 1 }
 
enum  AgoraMediaPixelFormat {
  AgoraMediaPixelFormatUnknown = 0, AgoraMediaPixelFormatI420 = 1, AgoraMediaPixelFormatBGRA = 2, AgoraMediaPixelFormatI422 = 3,
  AgoraMediaPixelFormatNV12 = 8
}
 
enum  AgoraMediaStreamType { AgoraMediaStreamTypeUnknow = 0, AgoraMediaStreamTypeVideo = 1, AgoraMediaStreamTypeAudio = 2, AgoraMediaStreamTypeSubtitle = 3 }
 
enum  AgoraMediaPlayerRenderMode { AgoraMediaPlayerRenderModeHidden = 1, AgoraMediaPlayerRenderModeFit = 2 }
 

Typedef Documentation

◆ View

typedef UIView View

Enumeration Type Documentation

◆ AgoraMediaPlayerState

AgoraMediaPlayerState, reporting the playback state.

Enumerator
AgoraMediaPlayerStateIdle 

0: Default state.

AgoraMediaPlayerStateOpening 

1: Opening the media resource.

AgoraMediaPlayerStateOpenCompleted 

2: Opened the media resource successfully.

AgoraMediaPlayerStatePlaying 

3: Playing the media resource.

AgoraMediaPlayerStatePaused 

4: Pauses the playback.

AgoraMediaPlayerStatePlayBackCompleted 

5: The playback is completed.

AgoraMediaPlayerStateStopped 

6: Stops the playback.

AgoraMediaPlayerStateFailed 

100: Fails to play the media resource.

◆ AgoraMediaPlayerError

AgoraMediaPlayerError, reporting the player's error code.

Enumerator
AgoraMediaPlayerErrorNone 

0: No error.

AgoraMediaPlayerErrorInvalidArguments 

-1: Invalid arguments.

AgoraMediaPlayerErrorInternal 

-2: Internal error.

AgoraMediaPlayerErrorNoSource 

-3: No resource.

AgoraMediaPlayerErrorInvalidMediaSource 

-4: Invalid media resource.

AgoraMediaPlayerErrorUnknowStreamType 

-5: The type of the media stream is unknown.

AgoraMediaPlayerErrorObjNotInitialized 

-6: The object is not initialized.

AgoraMediaPlayerErrorCodecNotSupported 

-7: The codec is not supported.

AgoraMediaPlayerErrorVideoRenderFailed 

-8: Invalid renderer.

AgoraMediaPlayerErrorInvalidState 

-9: Error occurs in the internal state of the player.

AgoraMediaPlayerErrorUrlNotFound 

-10: The URL of the media resource can not be found.

AgoraMediaPlayerErrorInvalidConnectState 

-11: Invalid connection between the player and Agora's Server.

AgoraMediaPlayerErrorSrcBufferUnderflow 

-12: The playback buffer is insufficient.

◆ AgoraMediaPlayerEvent

AgoraMediaPlayerEvent, reporting the result of the seek operation to the new playback position.

Enumerator
AgoraMediaPlayerEventSeekBegin 

0: Begins to seek to the new playback position.

AgoraMediaPlayerEventSeekComplete 

1: Finish seeking to the new playback position.

AgoraMediaPlayerEventSeekError 

2: Error occurs when seeking to the new playback position.

◆ AgoraMediaPlayerMetaDataType

AgoraMediaPlayerMetaDataType, reporting the type of the media metadata.

Enumerator
AgoraMediaPlayerMetaDataTypeUnknown 

0: The type is unknown.

AgoraMediaPlayerMetaDataTypeSEI 

1: The type is SEI.

◆ AgoraMediaPixelFormat

AgoraMediaPixelFormat, reporting the pixel format of the video stream.

Enumerator
AgoraMediaPixelFormatUnknown 

0: The format is known.

AgoraMediaPixelFormatI420 

1: The format is I420.

AgoraMediaPixelFormatBGRA 

2: The format is BGRA.

AgoraMediaPixelFormatI422 

3: The format is Planar YUV422.

AgoraMediaPixelFormatNV12 

8: The format is NV12.

◆ AgoraMediaStreamType

AgoraMediaStreamType, reporting the type of the media stream.

Enumerator
AgoraMediaStreamTypeUnknow 

0: The type is unknown.

AgoraMediaStreamTypeVideo 

1: The video stream.

AgoraMediaStreamTypeAudio 

2: The audio stream.

AgoraMediaStreamTypeSubtitle 

3: The subtitle stream.

◆ AgoraMediaPlayerRenderMode

AgoraMediaPlayerRenderMode, reporting the render mode of the player.

Enumerator
AgoraMediaPlayerRenderModeHidden 

1: Uniformly scale the video until it fills the visible boundaries (cropped). One dimension of the video may have clipped contents.

AgoraMediaPlayerRenderModeFit 

2: Uniformly scale the video until one of its dimension fits the boundary (zoomed to fit). Areas that are not filled due to disparity in the aspect ratio are filled with black.