AlivcLivePusher_Interactive v6.17.0
Aliyun Live Pusher Interactive SDK API Reference Manual for iOS Platforms
Loading...
Searching...
No Matches
AlivcLivePlayer Class Reference

The class for stream pulling in interactive mode. More...

#include "AlivcLivePlayer.h"

Inheritance diagram for AlivcLivePlayer:

Instance Methods

(int) - pauseAudioPlaying
 Pause playback of an audio stream(audio mute).
 
(int) - pauseVideoPlaying
 Pause playback of a video stream.
 
(int) - resumeAudioPlaying
 Resume playback of an audio stream(audio unmute).
 
(int) - resumeVideoPlaying
 Resume playback of a video stream.
 
(void) - setLivePlayerDelegate:
 Set the callback for playback AliLivePlayerDelegate.
 
(int) - setPlayoutVolume:
 Set the playback volume.
 
(int) - setPlayView:playCofig:
 Set the playback view.
 
(int) - snapshot:
 snapshot the video screen during playback
 
(void) - startPlayWithURL:
 Start playing audio and video streams.
 
(void) - stopPlay
 Stop playing audio and video streams.
 
(void) - updatePlayConfig:
 Update play configuration.
 
(void) - updateRenderView:
 Update video rendering controls for end users.
 

Properties

NSString * userId
 Get the UserId of the currently playing member.
 

Detailed Description

The class for stream pulling in interactive mode.

Only source URLs in interactive mode are supported

Attention
The current API can only be used to pull real-time interactive streams (RTC streams); If pulling a regular live CDN stream (bypass live stream), please use a standard protocol player
See also
推流SDK文档
直播连麦文档
推流SDK License文档

Method Documentation

◆ pauseAudioPlaying

- (int) pauseAudioPlaying

Pause playback of an audio stream(audio mute).

◆ pauseVideoPlaying

- (int) pauseVideoPlaying

Pause playback of a video stream.

◆ resumeAudioPlaying

- (int) resumeAudioPlaying

Resume playback of an audio stream(audio unmute).

◆ resumeVideoPlaying

- (int) resumeVideoPlaying

Resume playback of a video stream.

◆ setLivePlayerDelegate:

- (void) setLivePlayerDelegate: (id< AliLivePlayerDelegate >)  delegate

Set the callback for playback AliLivePlayerDelegate.

Parameters
delegatecallback

◆ setPlayoutVolume:

- (int) setPlayoutVolume: (NSInteger)  volume

Set the playback volume.

Parameters
volumeplayback volume,value range [0,400]
  • 0:muted
  • <100:Decrease the volume
  • >100:Increase the volume
Returns
  • 0: success
  • !=0: failure

◆ setPlayView:playCofig:

- (int) setPlayView: (UIView *)  view
playCofig: (AlivcLivePlayConfig *)  playConfig 

Set the playback view.

(This method is supported only in interactive mode.)

This method is used to set the playback control of remote streams in interaction scenarios such as interactive and battle. In co-streaming scenarios, the streamer sets the playback view of the video for viewers by using the setPlayView method, and the viewers set the playback view of the streamer by using the setPlayView method. In battle scenarios, streamer A and streamer B who start a battle call setPlayView to set the playback view of the other streamer.

Parameters
viewview
playConfigplay configuration AlivcLivePlayConfig
Returns
0:success != 0:failure

◆ snapshot:

- (int) snapshot: (AlivcLivePlayVideoStreamType)  videoStreamType

snapshot the video screen during playback

◆ startPlayWithURL:

- (void) startPlayWithURL: (NSString *)  url

Start playing audio and video streams.

(This method is supported only in interactive mode.)

This method is used to play the audio and video streams of the co-streamer or battling streamer in interaction scenarios (interactive and battle). In co-streaming scenarios, the streamer plays the audio and video streams of the interactive by using the startPlayWithURL method, and the co-streamer plays the audio and video streams of the streamer by using the startPlayWithURL method. In battle scenarios, streamer A and streamer B who start a battle call startPlayWithURL to play the audio and video streams of the other streamer.

Note
stopPlay, corresponding to the interface: stopPlay
This interface corresponds to the callback: onPlayStarted: (AliLivePlayerDelegate-p)
Parameters
urlThe streaming URL of the streamer or co-streamer.

◆ stopPlay

- (void) stopPlay

Stop playing audio and video streams.

(This method is supported only in interactive mode.)

This method corresponds to the startPlayWithURL method.

Note
This interface corresponds to the callback: AliLivePlayerDelegate::onPlayStopped:

◆ updatePlayConfig:

- (void) updatePlayConfig: (AlivcLivePlayConfig *)  playConfig

Update play configuration.

Parameters
playConfigplay configuration AlivcLivePlayConfig

◆ updateRenderView:

- (void) updateRenderView: (UIView *)  view

Update video rendering controls for end users.

This method is used to set the playback control of remote streams in interaction scenarios such as interactive and battle. A possible usage scenario is to first call setPlayView to set a playback view, and later need to update the rendering control of the stream.

Parameters
viewview

Property Documentation

◆ userId

- (NSString*) userId
readnonatomiccopy

Get the UserId of the currently playing member.


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