AliyunPlayer v7.2.0
Aliyun Player API Reference Manual for iOS Platforms
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties
AliListPlayer Class Reference

#include "AliListPlayer.h"

Inheritance diagram for AliListPlayer:
AliPlayer

Instance Methods

(void) - addUrlSource:uid:
 Add a resource to the playlist.
 
(void) - addUrlSource:uid:config:
 Add a resource to the playlist.
 
(void) - addVidSource:uid:
 Add a resource to the playlist.
 
(void) - clear
 Clear the playlist.
 
(NSString *) - currentUid
 Query the UID of the resource that is being played.
 
(void) - destroy
 Sync delete the player.
 
(void) - destroyAsync
 Async delete the player.
 
(void) - enableStrategy:enable:
 enable preload strategy.
 
(AliPlayer *) - getCurrentPlayer
 
(AVPMultiBitratesMode- GetMultiBiratesMode
 Get current MultiBitrate preload mode.
 
(AliPlayer *) - getPreRenderPlayer
 
(instancetype) - init
 Initialize the playlist.
 
(instancetype) - init:
 Initialize the player.
 
(BOOL) - moveTo:
 Seek to the specified position and prepare for playback.
 
(BOOL) - moveTo:accId:accKey:token:region:
 Seek to the specified resource and prepare for playback.
 
(BOOL) - moveTo:playAuth:
 Seek to the specified resource and prepare for playback.
 
(BOOL) - moveToNext
 Seek to the next resource and prepare for playback.
 
(BOOL) - moveToNext:
 Seek to the next resource and prepare for playback.
 
(BOOL) - moveToNext:accKey:token:region:
 Seek to the next resource and prepare for playback.
 
(BOOL) - moveToNextWithPrerendered
 Seek to the next resource and prepare for playback.
 
(BOOL) - moveToNextWithPrerendered:
 Seek to the next resource and prepare for playback.
 
(BOOL) - moveToNextWithPrerendered:accKey:token:region:
 Seek to the next resource and prepare for playback.
 
(BOOL) - moveToPre
 Seek to the previous resource and prepare for playback.
 
(BOOL) - moveToPre:
 Seek to the previous resource and prepare for playback.
 
(BOOL) - moveToPre:accKey:token:region:
 Seek to the previous resource and prepare for playback.
 
(void) - removeSource:
 Remove a resource from the playlist.
 
(void) - SetMultiBitratesMode:
 SetMultiBitrate preload mode.
 
(void) - setPreloadCount:nextCount:
 update set preload count
 
(void) - setScene:
 Set preload scene.
 
(void) - setStrategyParam:strategyParam:
 set strategy parameter.
 
(void) - stop
 Stop.
 
(void) - updatePreloadConfig:
 update preload config related to uid
 
(void) - updatePreloadConfiguid:config:
 update preload config
 
- Instance Methods inherited from AliPlayer
(void) - addExtSubtitle:
 Add external subtitles.
 
(void) - clearScreen
 Clear screen.
 
(void) - clearScreenSync
 Clear screen sync.
 
(void) - enableDowngrade:config:
 Modify player configuration.
 
(NSString *) - getCacheFilePath:
 Query the name of the cached file with the specified URL.
 
(NSString *) - getCacheFilePath:format:definition:
 Query the name of the cached file with the specified URL.
 
(NSString *) - getCacheFilePath:format:definition:previewTime:
 Query the name of the cached file with the specified URL.
 
(AVPConfig *) - getConfig
 Query player configuration.
 
(AVPTrackInfo *) - getCurrentTrack:
 Query the track that is being played.
 
(AVPMediaInfo *) - getMediaInfo
 Query media information, including track information.
 
(NSString *) - getOption:
 Get player information.
 
(int64_t) - getPlayedDuration
 @breif get played time, will not affected by seek
 
(void *) - getPlayer
 
(NSString *) - getPlayerName
 Get used player name.
 
(NSString *) - getPropertyString:
 Get information by key.
 
(AVPMediaInfo *) - getSubMediaInfo
 Query media sub stream information, including track information.
 
(void) - getThumbnail:
 Retrieve the thumbnail image at the specified position.
 
(NSString *) - getUserData
 Get user data, and each player instance bind one.
 
(int) - invokeComponent:
 Send command to component.
 
(void) - pause
 Pause.
 
(void) - prepare
 Prepare for playback.
 
(void) - redraw
 Refresh the view in certain situations, for example, when the size of the view changes.
 
(void) - reload
 Reload resources.
 
(void) - reset
 Reset.
 
(void) - seekToTime:seekMode:
 Seek to a specified position.
 
(void) - selectExtSubtitle:enable:
 Select external subtitles.
 
(void) - selectTrack:
 Switch definition according to the specified track index.
 
(void) - selectTrack:accurate:
 Switch definition according to the specified track index.
 
(void) - sendCustomEvent:
 Send custom event, will callback through AVPEventReportParamsDelegate.
 
(void) - setAuthSource:
 Play by VID and playauth.
 
(void) - setBitStreamSource:
 Play by bit stream.
 
(BOOL) - setCacheConfig:
 Modify cache configuration.
 
(void) - setConfig:
 Modify player configuration.
 
(void) - setDefaultBandWidth:
 Set the default playback bitrate for multi-bit rate.
 
(void) - setEventReportParamsDelegate:
 Set a proxy.
 
(void) - setFilterConfig:
 Set filter config.
 
(void) - setFilterInvalid:invalid:
 disable/enable filter.
 
(void) - setLiveStsSource:
 Play by 使用LiveSts.
 
(void) - setMaxAccurateSeekDelta:
 set the maximum interval of precision seek.
 
(void) - setMpsSource:
 Play by VID and MPS.
 
(void) - setOption:value:
 Set specified option.
 
(void) - setOption:valueInt:
 Set specified option.
 
(void) - setPictureinPictureDelegate:
 set delegate for picture in picture
 
(void) - setPictureInPictureEnable:
 Set picture in picture enable (The picture in picture function of the player requires systems above ios15.
 
(void) - setPictureInPictureShowMode:
 set show mode for picture in picture
 
(void) - setPlayUrlConvertCallback:
 Set a URL conversion callback.
 
(void) - setPreferPlayerName:
 Set preper player name.
 
(void) - setStartTime:seekMode:
 Set a specified position as play start.Call this API before prepare, only take effect once.
 
(void) - setStreamDelayTime:time:
 set the delay time of the stream
 
(void) - setStsSource:
 Play by VID and STS.
 
(void) - setThumbnailUrl:
 Specify a thumbnail image URL.
 
(void) - setTraceID:
 Set a trace ID for debugging.
 
(void) - setUrlSource:
 Play by URL.
 
(void) - setUserData:
 Set user data, and will be passed to some global API, so that client can know from which player instance.
 
(void) - setVerifyStsCallback:
 Set the AVPStsInfo expiration callback.
 
(void) - setVideoTag:size:
 Set the video tags.
 
(void) - snapShot
 Snapshot.
 
(void) - start
 Start playing.
 
(void) - switchStream:
 Multi definition stream switch by url.
 
(void) - updateFilterConfig:options:
 upadate filter config.
 
(void) - updateLiveStsInfo:accKey:token:region:
 update liveSts info.
 

Properties

int maxPreloadMemorySizeMB
 Set the maximum preloading cache size.
 
NSString * playAuthPreloadDefinition
 
int preloadCount
 Query or set the number of preloaded resources.
 
NSString * stsPreloadDefinition
 Query or set the definition for playback by STS, such as LD or HD.
 
- Properties inherited from AliPlayer
id< CicadaRenderDelegate > renderDelegate __deprecated
 Set the render callback.
 
AVPAlphaRenderMode alphaRenderMode
 Set a rendering mode.
 
BOOL autoPlay
 Enable or disable autoplay.
 
int64_t bufferedPosition
 Query the buffered position.
 
int64_t currentDownloadSpeed
 Query the current download speed.
 
int64_t currentPosition
 Query the current playback position.
 
int64_t currentUtcTime
 Query the current playback utc time.
 
id< AVPDelegatedelegate
 Set a proxy.
 
int64_t duration
 Query the length of the video.
 
BOOL enableHardwareDecoder
 Enable or disable hardware decoding.
 
id< AVPEventReportParamsDelegateeventReportParamsDelegate
 Set the event report callback.
 
int height
 Query the height of the video.
 
int64_t localCacheLoadedSize
 Query the current playback cached file size.
 
BOOL loop
 Enable or disable loop playback.
 
AVPMirrorMode mirrorMode
 Set a mirroring mode.
 
BOOL muted
 Mute or unmute the player.
 
AVPOutputAudioChannel outputAudioChannel
 Set the output audio channel, if input source is stereo, support select to left or right channel and if intput source is mono, this api can't take effect.
 
AVPStatus playerStatus
 Query the player status.
 
AVPView * playerView
 Set a player view (playerView).
 
float rate
 Set the playback speed.
 
id< CicadaRenderingDelegate > renderingDelegate
 Set the render callback.
 
AVPRotateMode rotateMode
 Set a rotate mode.
 
int rotation
 Query the rotate angle of the video, which is retrieved from the video metadata.
 
AVPScalingMode scalingMode
 Set a zoom mode.
 
float volume
 Query or set the volume of the player(Not system volume).
 
int width
 Query the width of the video.
 

Additional Inherited Members

- Class Methods inherited from AliPlayer
(NSString *) + getDeviceUUID
 Query device UUID.
 
(NSString *) + getSDKVersion
 Query the SDK version.
 
(void) + initPlayerComponent:function:
 Initialize player components.
 
(BOOL) + isFeatureSupport:
 judge whether support the type of feature.
 
(void) + netWorkReConnect
 reconnect all connections, call this when netWork router changed, and the player will use new router.
 
(void) + setAudioSessionDelegate:
 Set AudioSession Delegate.
 
(void) + setEnableLog:
 Enable or disable logging.
 
(void) + setLogCallbackInfo:callbackBlock:
 Set a log output callback block.
 
(void) + setLogOption:value:
 Set log option.
 

Method Documentation

◆ addUrlSource:uid:

- (void) addUrlSource: (NSString *) url
uid: (NSString *) uid 

Add a resource to the playlist.

Parameters
urlSpecify a resource by URL.
uidThe UID of the resource, which uniquely identifies a resource.

◆ addUrlSource:uid:config:

- (void) addUrlSource: (NSString *) urlSource
uid: (NSString *) uid
config: (AVPPreloadConfig *) config 

Add a resource to the playlist.

Parameters
urlSpecify a resource by URL.
uidThe UID of the resource, which uniquely identifies a resource.
configpreload config

◆ addVidSource:uid:

- (void) addVidSource: (NSString *) vid
uid: (NSString *) uid 

Add a resource to the playlist.

Parameters
vidSpecify a resource by VID.
uidThe UID of the resource, which uniquely identifies a resource.

◆ clear

- (void) clear

Clear the playlist.

◆ currentUid

- (NSString *) currentUid

Query the UID of the resource that is being played.

◆ destroy

- (void) destroy

Sync delete the player.

Implements AliPlayer.

◆ destroyAsync

- (void) destroyAsync

Async delete the player.

When instance is not needed, skip calling stop api and call this destroyAsync api can speed up view response. Once called, don't call prepare to start new play.

Implements AliPlayer.

◆ enableStrategy:enable:

- (void) enableStrategy: (AVPStrategyType) type
enable: (bool) enable 

enable preload strategy.

Parameters
typestrategy type
enableenable strategy

◆ getCurrentPlayer

- (AliPlayer *) getCurrentPlayer

◆ GetMultiBiratesMode

- (AVPMultiBitratesMode) GetMultiBiratesMode

Get current MultiBitrate preload mode.

◆ getPreRenderPlayer

- (AliPlayer *) getPreRenderPlayer

◆ init

- (instancetype) init

Initialize the playlist.

Implements AliPlayer.

◆ init:

- (instancetype) init: (NSString *) traceID

Initialize the player.

Parameters
traceIDThe trace ID for debugging.

Implements AliPlayer.

◆ moveTo:

- (BOOL) moveTo: (NSString *) uid

Seek to the specified position and prepare for playback.

Only playback by URL is supported.

Parameters
uidThe UID of the specified resource, which uniquely identifies a resource.

◆ moveTo:accId:accKey:token:region:

- (BOOL) moveTo: (NSString *) uid
accId: (NSString *) accId
accKey: (NSString *) accKey
token: (NSString *) token
region: (NSString *) region 

Seek to the specified resource and prepare for playback.

Only playback by STS is supported. You must update the STS information.

Parameters
uidThe UID of the specified resource, which uniquely identifies a resource.
accIdvid The AccessKey ID.
accKeyvid The AccessKey Secret.
tokenvid The STS token.
regionvid The specified region. Default: cn-shanghai.

◆ moveTo:playAuth:

- (BOOL) moveTo: (NSString *) uid
playAuth: (NSString *) playAuth 

Seek to the specified resource and prepare for playback.

Only playback by playauth is supported. You must update the playauth information.

Parameters
uidThe UID of the specified resource, which uniquely identifies a resource.
playAuthvid The playAuth ID.

◆ moveToNext

- (BOOL) moveToNext

Seek to the next resource and prepare for playback.

Only playback by URL is supported.

◆ moveToNext:

- (BOOL) moveToNext: (NSString *) playAuth

Seek to the next resource and prepare for playback.

Only playback by playauth is supported. You must update the playauth information.

Parameters
playAuthvid The playAuth ID.

◆ moveToNext:accKey:token:region:

- (BOOL) moveToNext: (NSString *) accId
accKey: (NSString *) accKey
token: (NSString *) token
region: (NSString *) region 

Seek to the next resource and prepare for playback.

Only playback by STS is supported. You must update the STS information.

Parameters
accIdvid The AccessKey ID.
accKeyvid The AccessKey Secret.
tokenvid The STS token.
regionvid The specified region. Default: cn-shanghai.

◆ moveToNextWithPrerendered

- (BOOL) moveToNextWithPrerendered

Seek to the next resource and prepare for playback.

Only playback by URL is supported.

◆ moveToNextWithPrerendered:

- (BOOL) moveToNextWithPrerendered: (NSString *) playAuth

Seek to the next resource and prepare for playback.

Only playback by playauth is supported. You must update the playauth information.

Parameters
playAuthvid The playAuth ID.

◆ moveToNextWithPrerendered:accKey:token:region:

- (BOOL) moveToNextWithPrerendered: (NSString *) accId
accKey: (NSString *) accKey
token: (NSString *) token
region: (NSString *) region 

Seek to the next resource and prepare for playback.

Only playback by STS is supported. You must update the STS information.

Parameters
accIdvid The AccessKey ID.
accKeyvid The AccessKey Secret.
tokenvid The STS token.
regionvid The specified region. Default: cn-shanghai.

◆ moveToPre

- (BOOL) moveToPre

Seek to the previous resource and prepare for playback.

Only playback by URL is supported.

◆ moveToPre:

- (BOOL) moveToPre: (NSString *) playAuth

Seek to the previous resource and prepare for playback.

Only playback by playauth is supported. You must update the playauth information.

Parameters
playAuthvid The playAuth ID.

◆ moveToPre:accKey:token:region:

- (BOOL) moveToPre: (NSString *) accId
accKey: (NSString *) accKey
token: (NSString *) token
region: (NSString *) region 

Seek to the previous resource and prepare for playback.

Only playback by STS is supported. You must update the STS information.

Parameters
accIdvid The AccessKey ID.
accKeyvid The AccessKey Secret.
tokenvid The STS token.
regionvid The specified region. Default: cn-shanghai.

◆ removeSource:

- (void) removeSource: (NSString *) uid

Remove a resource from the playlist.

Parameters
uidThe UID of the resource, which uniquely identifies a resource.

◆ SetMultiBitratesMode:

- (void) SetMultiBitratesMode: (AVPMultiBitratesMode) mode

SetMultiBitrate preload mode.

Parameters
modeThe MultiBitrate preload mode

◆ setPreloadCount:nextCount:

- (void) setPreloadCount: (int) prevCount
nextCount: (int) nextCount 

update set preload count

Parameters
prevCountprevious preload count
nextCountnext preload count

◆ setScene:

- (void) setScene: (AVPSceneType) type

Set preload scene.

Parameters
typescene type

◆ setStrategyParam:strategyParam:

- (void) setStrategyParam: (AVPStrategyType) type
strategyParam: (NSString *) strategyParam 

set strategy parameter.

Parameters
typestrategy type
strategyParamstrategy parameter, type is json string support param: algorithm, offset, scale for example: dynamic preload duration decrease strategy default strategy { "algorithm":"sub", "offset":"500" } transfer to string: "{\"algorithm\": \"div\",\"scale\": \"0.75\"}" or { "algorithm":"div", "scale":"0.75" }

◆ stop

- (void) stop

Stop.

Implements AliPlayer.

◆ updatePreloadConfig:

- (void) updatePreloadConfig: (AVPPreloadConfig *) config

update preload config related to uid

Parameters
uideach URL is a unique UID
configpreload config

◆ updatePreloadConfiguid:config:

- (void) updatePreloadConfiguid: (NSString *) uid
config: (AVPPreloadConfig *) config 

update preload config

Parameters
configpreload config

Property Documentation

◆ maxPreloadMemorySizeMB

- (int) maxPreloadMemorySizeMB
readwritenonatomicassign

Set the maximum preloading cache size.

Default: 100 MB. Minimum: 20 MB.

◆ playAuthPreloadDefinition

- (NSString*) playAuthPreloadDefinition
readwritenonatomiccopy

◆ preloadCount

- (int) preloadCount
readwritenonatomicassign

Query or set the number of preloaded resources.

The number of resources before preloading and the number of resources after preloading are returned. Default: 2.

◆ stsPreloadDefinition

- (NSString*) stsPreloadDefinition
readwritenonatomiccopy

Query or set the definition for playback by STS, such as LD or HD.

Call this method before moveTo. After the resources are preloaded, you cannot change the definition.


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