AlivcLivePusher_Interactive v6.17.0
Aliyun Live Pusher Interactive SDK API Reference Manual for iOS Platforms
Loading...
Searching...
No Matches
<AliLivePlayerDelegate> Protocol Reference

Live interaction player engine callbacks. More...

#include "AlivcLivePlayer.h"

Inheritance diagram for <AliLivePlayerDelegate>:

Instance Methods

(void) - onAudioMuted:muted:
 mute/unmute callback
 
(void) - onAudioSubscribeStateChanged:oldState:newState:
 Audio stream subscription change callback.
 
(void) - onError:code:message:
 The callback for playback errors.
 
(void) - onFirstAudioFrameDecoded:
 The callback for first audio frame received.
 
(void) - onFirstAudioFrameReceived:
 The callback for first audio frame received.
 
(void) - onFirstVideoFrameDrawn:
 The callback for first frame rendering.
 
(void) - onFirstVideoFrameReceived:
 The callback for first video frame received.
 
(void) - onNetworkQualityChanged:upNetworkQuality:downNetworkQuality:
 The message that is sent when the network quality changes.
 
(void) - onPlayerStatistics:statsInfo:
 The callback for playback statistics.
 
(void) - onPlayoutVolumeUpdate:volume:speechState:
 callback for playback volume and whether is speaking
 
(void) - onPlayStarted:
 The callback for playback start.
 
(void) - onPlayStoped:
 The callback for playback end.
 
(void) - onReceiveDataChannelMessage:data:
 Data channel message callback.
 
(void) - onReceiveSeiMessage:payloadType:data:
 SEI callback.
 
(void) - onRemoteAudioSampleCallback:audioSample:
 The remote original audio data callback.
 
(void) - onRemoteUserLeave:leaveReason:
 
(BOOL) - onRemoteVideoSample:videoSample:
 Remote video data callback.
 
(void) - onScreenShareSubscribeStateChanged:oldState:newState:
 Screen stream subscription change callback.
 
(void) - onSnapshot:image:
 Snapshot callbacks.
 
(void) - onVideoEnabled:enabled:
 The peer user closes camera capture and sends notification (AlivcLivePusher->enableLocalCamera is called)
 
(void) - onVideoMuted:muted:
 Turn video notifications on/off.
 
(void) - onVideoResolutionChanged:width:height:
 video resolution change notification
 
(void) - onVideoSubscribeStateChanged:oldState:newState:
 Camera stream subscription change callback.
 

Detailed Description

Live interaction player engine callbacks.

Method Documentation

◆ onAudioMuted:muted:

- (void) onAudioMuted: (AlivcLivePlayer *)  player
muted: (BOOL)  isMute 
optional

mute/unmute callback

Parameters
playerLive interaction player engine object
isMute
  • YES: mute
  • NO: unmute

◆ onAudioSubscribeStateChanged:oldState:newState:

- (void) onAudioSubscribeStateChanged: (AlivcLivePlayer *)  player
oldState: (AliLiveSubscribeState)  oldState
newState: (AliLiveSubscribeState)  newState 
optional

Audio stream subscription change callback.

Parameters
playerLive interaction player engine object
oldStatePrevious subscription status, see AliLiveSubscribeState for details
newStateCurrent 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
playerLive interaction player engine object
codeerrorCode AlivcLivePlayerError
msgerror msg

◆ onFirstAudioFrameDecoded:

- (void) onFirstAudioFrameDecoded: (AlivcLivePlayer *)  player
optional

The callback for first audio frame received.

Parameters
playerLive interaction player engine object

◆ onFirstAudioFrameReceived:

- (void) onFirstAudioFrameReceived: (AlivcLivePlayer *)  player
optional

The callback for first audio frame received.

Parameters
playerLive interaction player engine object

◆ onFirstVideoFrameDrawn:

- (void) onFirstVideoFrameDrawn: (AlivcLivePlayer *)  player
optional

The callback for first frame rendering.

Parameters
playerLive interaction player engine object

◆ onFirstVideoFrameReceived:

- (void) onFirstVideoFrameReceived: (AlivcLivePlayer *)  player
optional

The callback for first video frame received.

Parameters
playerLive 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
playerLive interaction player engine object
upQualityup network quality
downQualitydown network quality
Note
Triggered when peer network quality changes.

◆ onPlayerStatistics:statsInfo:

- (void) onPlayerStatistics: (AlivcLivePlayer *)  player
statsInfo: (AlivcLivePlayerStatsInfo *)  statistics 
optional

The callback for playback statistics.

Parameters
playerLive interaction player engine object
statisticsstatistics
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
playerplayer Live interaction player engine object
volumevolume
isSpeakingis speaking

◆ onPlayStarted:

- (void) onPlayStarted: (AlivcLivePlayer *)  player
optional

The callback for playback start.

Parameters
playerLive interaction player engine object

◆ onPlayStoped:

- (void) onPlayStoped: (AlivcLivePlayer *)  player
optional

The callback for playback end.

Parameters
playerLive interaction player engine object

◆ onReceiveDataChannelMessage:data:

- (void) onReceiveDataChannelMessage: (AlivcLivePlayer *)  player
data: (NSData *)  data 
optional

Data channel message callback.

Parameters
playerLive interaction player engine object
dataData

◆ onReceiveSeiMessage:payloadType:data:

- (void) onReceiveSeiMessage: (AlivcLivePlayer *)  player
payloadType: (int)  payloadType
data: (NSData *)  data 
optional

SEI callback.

Parameters
playerLive interaction player engine object
payloadTypeType
dataData

◆ onRemoteAudioSampleCallback:audioSample:

- (void) onRemoteAudioSampleCallback: (AlivcLivePlayer *)  player
audioSample: (AlivcLivePusherAudioDataSample *)  audioSample 
optional

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
    pusherThe live pusher engine object
    audioSampleaudio sample data AlivcLivePusherAudioDataSample
    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:

- (BOOL) onRemoteVideoSample: (AlivcLivePlayer *)  player
videoSample: (AlivcLiveVideoDataSample *_Nonnull)  videoSample 
optional

Remote video data callback.

Parameters
playerLive interaction player engine object
videoSamplevideo 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
playerLive interaction player engine object
oldStatePrevious subscription status, see AliLiveSubscribeState for details
newStateCurrent subscription status, see AliLiveSubscribeState for details

◆ onSnapshot:image:

- (void) onSnapshot: (AlivcLivePlayer *)  player
image: (UIImage *)  image 
optional

Snapshot callbacks.

Parameters
playerplayer Live interaction player engine object
imagesnap 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
playerLive 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:

- (void) onVideoMuted: (AlivcLivePlayer *)  player
muted: (BOOL)  isMute 
optional

Turn video notifications on/off.

Parameters
playerLive 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
playerLive interaction player engine object
widthvideo width
heightvideo height

◆ onVideoSubscribeStateChanged:oldState:newState:

- (void) onVideoSubscribeStateChanged: (AlivcLivePlayer *)  player
oldState: (AliLiveSubscribeState)  oldState
newState: (AliLiveSubscribeState)  newState 
optional

Camera stream subscription change callback.

Parameters
playerLive interaction player engine object
oldStatePrevious subscription status, see AliLiveSubscribeState for details
newStateCurrent subscription status, see AliLiveSubscribeState for details

The documentation for this protocol was generated from the following file: