Live interaction player engine callbacks.
More...
#include "AlivcLivePlayer.h"
Live interaction player engine callbacks.
◆ onAudioMuted:muted:
mute/unmute callback
- Parameters
-
player | Live interaction player engine object |
isMute |
|
◆ onAudioSubscribeStateChanged:oldState:newState:
- (void) onAudioSubscribeStateChanged: |
|
(AlivcLivePlayer *) |
player |
oldState: |
|
(AliLiveSubscribeState) |
oldState |
newState: |
|
(AliLiveSubscribeState) |
newState |
|
|
| |
|
optional |
Audio stream subscription change callback.
- Parameters
-
player | Live interaction player engine object |
oldState | Previous subscription status, see AliLiveSubscribeState for details |
newState | Current subscription status, see AliLiveSubscribeState for details |
◆ onError:code:message:
- (void) onError: |
|
(AlivcLivePlayer *) |
player |
code: |
|
(AlivcLivePlayerError) |
code |
message: |
|
(NSString *) |
msg |
|
|
| |
|
optional |
The callback for playback errors.
- Parameters
-
◆ onFirstAudioFrameDecoded:
The callback for first audio frame received.
- Parameters
-
player | Live interaction player engine object |
◆ onFirstAudioFrameReceived:
The callback for first audio frame received.
- Parameters
-
player | Live interaction player engine object |
◆ onFirstVideoFrameDrawn:
The callback for first frame rendering.
- Parameters
-
player | Live interaction player engine object |
◆ onFirstVideoFrameReceived:
The callback for first video frame received.
- Parameters
-
player | Live interaction player engine object |
◆ onNetworkQualityChanged:upNetworkQuality:downNetworkQuality:
- (void) onNetworkQualityChanged: |
|
(AlivcLivePlayer *) |
player |
upNetworkQuality: |
|
(AlivcLiveNetworkQuality) |
upQuality |
downNetworkQuality: |
|
(AlivcLiveNetworkQuality) |
downQuality |
|
|
| |
|
optional |
The message that is sent when the network quality changes.
- Parameters
-
player | Live interaction player engine object |
upQuality | up network quality |
downQuality | down network quality |
- Note
- Triggered when peer network quality changes.
◆ onPlayerStatistics:statsInfo:
The callback for playback statistics.
- Parameters
-
player | Live interaction player engine object |
statistics | statistics |
- Note
- videoBitrate in statistics is the total video receiving bit rate
◆ onPlayoutVolumeUpdate:volume:speechState:
- (void) onPlayoutVolumeUpdate: |
|
(AlivcLivePlayer *) |
player |
volume: |
|
(int) |
volume |
speechState: |
|
(BOOL) |
isSpeaking |
|
|
| |
|
optional |
callback for playback volume and whether is speaking
- Parameters
-
player | player Live interaction player engine object |
volume | volume |
isSpeaking | is speaking |
◆ onPlayStarted:
The callback for playback start.
- Parameters
-
player | Live interaction player engine object |
◆ onPlayStoped:
The callback for playback end.
- Parameters
-
player | Live interaction player engine object |
◆ onReceiveDataChannelMessage:data:
- (void) onReceiveDataChannelMessage: |
|
(AlivcLivePlayer *) |
player |
data: |
|
(NSData *) |
data |
|
|
| |
|
optional |
Data channel message callback.
- Parameters
-
player | Live interaction player engine object |
data | Data |
◆ onReceiveSeiMessage:payloadType:data:
- (void) onReceiveSeiMessage: |
|
(AlivcLivePlayer *) |
player |
payloadType: |
|
(int) |
payloadType |
data: |
|
(NSData *) |
data |
|
|
| |
|
optional |
SEI callback.
- Parameters
-
player | Live interaction player engine object |
payloadType | Type |
data | Data |
◆ onRemoteAudioSampleCallback:audioSample:
The remote original audio data callback.
It is turned off by default and needs to be turned on by enableAudioFrameObserver: YES audioSource: AliLiveAudioSourceRemoteUser
- This interface supports setting the sampling rate and number of channels
- This interface supports read and write modes
- Parameters
-
- Note
- Please do not do any time-consuming operations in this callback function, otherwise it may cause abnormal sound
◆ onRemoteUserLeave:leaveReason:
- (void) onRemoteUserLeave: |
|
(AlivcLivePlayer *) |
player |
leaveReason: |
|
(AliLiveUserOfflineReason) |
reason |
|
|
| |
|
optional |
◆ onRemoteVideoSample:videoSample:
Remote video data callback.
- Parameters
-
player | Live interaction player engine object |
videoSample | video raw data |
- Returns
- YES: Need to write back to SDK
- NO: No need to write back to SDK
- Note
- There is no callback by default. It needs to be enabled through AlivcLivePushConfig.enableRemoteVideoFrameObserver. After it is enabled, the remote video raw data can be called back.
◆ onScreenShareSubscribeStateChanged:oldState:newState:
- (void) onScreenShareSubscribeStateChanged: |
|
(AlivcLivePlayer *) |
player |
oldState: |
|
(AliLiveSubscribeState) |
oldState |
newState: |
|
(AliLiveSubscribeState) |
newState |
|
|
| |
|
optional |
Screen stream subscription change callback.
- Parameters
-
player | Live interaction player engine object |
oldState | Previous subscription status, see AliLiveSubscribeState for details |
newState | Current subscription status, see AliLiveSubscribeState for details |
◆ onSnapshot:image:
Snapshot callbacks.
- Parameters
-
player | player Live interaction player engine object |
image | snap image |
◆ onVideoEnabled:enabled:
- (void) onVideoEnabled: |
|
(AlivcLivePlayer *) |
player |
enabled: |
|
(BOOL) |
isEnable |
|
|
| |
|
optional |
The peer user closes camera capture and sends notification (AlivcLivePusher->enableLocalCamera is called)
- Parameters
-
player | Live interaction player engine object |
isEnable |
- YES: open camera
- NO: close camera
|
- Note
- This interface is used to call back when the peer user closes camera capture .
◆ onVideoMuted:muted:
Turn video notifications on/off.
- Parameters
-
player | Live interaction player engine object |
isMute |
- YES: Close video
- NO: Open video
|
◆ onVideoResolutionChanged:width:height:
- (void) onVideoResolutionChanged: |
|
(AlivcLivePlayer *) |
player |
width: |
|
(int) |
width |
height: |
|
(int) |
height |
|
|
| |
|
optional |
video resolution change notification
- Parameters
-
player | Live interaction player engine object |
width | video width |
height | video height |
◆ onVideoSubscribeStateChanged:oldState:newState:
- (void) onVideoSubscribeStateChanged: |
|
(AlivcLivePlayer *) |
player |
oldState: |
|
(AliLiveSubscribeState) |
oldState |
newState: |
|
(AliLiveSubscribeState) |
newState |
|
|
| |
|
optional |
Camera stream subscription change callback.
- Parameters
-
player | Live interaction player engine object |
oldState | Previous subscription status, see AliLiveSubscribeState for details |
newState | Current subscription status, see AliLiveSubscribeState for details |
The documentation for this protocol was generated from the following file: