AliyunPlayer v7.10.0
Aliyun Player API Reference Manual for iOS Platforms
Loading...
Searching...
No Matches
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) - setOption:valueInt:
 Set player specific option (integer value).
(void) - setPreloadCount:nextCount:
 update set preload count
(void) - setScene:
 Set preload scene.
(void) - setStrategyParam:strategyParam:
 set strategy parameter.
(void) - stop
 Stop playback.
(void) - updatePreloadConfig:
 update preload config related to uid
(void) - updatePreloadConfiguid:config:
 update preload config
Instance Methods inherited from AliPlayer
(void) - addExtSubtitle:
 Add external subtitle file.
(void) - clearScreen
 Clear screen.
(void) - clearScreenSync
 Clear screen sync, suggest using clearScreen.
(void) - enableDowngrade:config:
 Set player downgrade configuration, applicable to RTS custom downgrade url settings, for details please refer to RTS自定义降级url设置.
(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.
(NSString *) - getOption:
 Get player option parameter.
(int64_t) - getPlayedDuration
 Get the actual played duration.
(void *) - getPlayer
(NSString *) - getPlayerName
 Get used player name.
(NSString *) - getPropertyString:
 Get player property information.
(AVPMediaInfo *) - getSubMediaInfo
 Query sub-stream media information.
(void) - getThumbnail:
 Retrieve the thumbnail image at the specified position.
(NSString *) - getUserData
 Get user data of the player instance.
(int) - invokeComponent:
 Send command to component.
(BOOL) - isAutoBandWidth
 Query the status of adaptive initial quality selection for multi-bitrate playback.
(BOOL) - isEnableSubtitleRender
 Query whether subtitle rendering is enabled.
(void) - pause
 Pause playback.
(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 or disable external subtitle track.
(void) - selectTrack:
 Switch video quality according to the specified track index.
(void) - selectTrack:accurate:
 Switch video quality according to the specified track index with accurate seeking option.
(void) - sendCustomEvent:
 Send custom analytics event.
(void) - setAuthSource:
 Play by VID and playauth.
(void) - setAutoBandWidth:
 Enable or disable adaptive initial playback quality selection for multi-bitrate playback.
(void) - setBitStreamSource:
 Play by bit stream.
(BOOL) - setCacheConfig:
 Modify cache configuration.
(void) - setConfig:
 Modify player configuration.
(void) - setDefaultBandWidth:
 Set the default initial playback bitrate for multi-bitrate playback.
(void) - setDefaultResolution:
 Set the default initial playback resolution for multi-bitrate playback.
(void) - setEnableSubtitleRender:
 Enable or disable subtitle rendering.
(void) - setEventReportParamsDelegate:
 Set event report delegate.
(void) - setFilterConfig:
 Set filter configuration.
(void) - setFilterInvalid:invalid:
 Enable or disable filter.
(void) - setLiveStsSource:
 Play by LiveSts.
(void) - setMaxAccurateSeekDelta:
 Set the maximum interval for accurate seeking.
(void) - setMpsSource:
 Play by VID and MPS.
(void) - setOnURLSourceExpiredCallback:
 Set the callback for URL source expiration notification.
(void) - setOnVidAuthExpiredCallback:
 Set the callback for VidAuth source expiration notification.
(void) - setOption:value:
 Set player specific option (string value).
(void) - setPictureinPictureDelegate:
 Set delegate for picture-in-picture functionality.
(void) - setPictureInPictureEnable:
 Enable or disable picture-in-picture functionality.
(void) - setPictureInPictureShowMode:
 Set display mode for picture-in-picture functionality.
(void) - setPlayerScene:
 Set player scene.
(void) - setPlayUrlConvertCallback:
 Set a URL conversion callback.
(void) - setPreferPlayerName:
 Set preferred player kernel.
(void) - setStartTime:seekMode:
 Set the initial playback position.
(void) - setStreamDelayTime:time:
 set the delay time of the stream, default is 0 only support external subtitles
(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 for the player instance.
(void) - setVerifyStsCallback:
 Set STS validity verification callback for encrypted live streaming.
(void) - setVideoTag:size:
 Set the video tags.
(void) - snapShot
 Capture the current frame.
(void) - start
 Start playing.
(void) - switchStream:
 Multi definition stream switch by url.
(void) - updateFilterConfig:options:
 Update filter configuration.
(void) - updateLiveStsInfo:accKey:token:region:
 Update LiveStsInfo.

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 alpha render mode, can be used on gift play on live stream, etc.
BOOL autoPlay
 Enable or disable autoplay.
int64_t bufferedPosition
 Buffered position.
int64_t currentDownloadSpeed
 Current network download speed.
int64_t currentPosition
 Current playback position.
int64_t currentUtcTime
 Query the current playback utc time.
id< AVPDelegatedelegate
 Player delegate.
id< AVPDrmDelegatedrmDelegate
 DRM delegate.
int64_t duration
 Playback duration.
BOOL enableHardwareDecoder
 Hardware decoding enabled state.
id< AVPEventReportParamsDelegateeventReportParamsDelegate
 Set the event report callback.
int height
 Query the height of the video.
int64_t localCacheLoadedSize
 Local cache hit 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
 Player status.
AVPView * playerView
 Set a player view (playerView).
float rate
 Set the playback speed.
id< CicadaRenderingDelegate > renderingDelegate
 Video rendering delegate (new).
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 component.
(BOOL) + isFeatureSupport:
 Query feature support.
(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, see AVPStrategyType
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.
Returns
Indicates whether the current operation succeeded.

◆ 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.
Returns
Indicates whether the current operation succeeded.

◆ 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.
Returns
Indicates whether the current operation succeeded.

◆ moveToNext

- (BOOL) moveToNext

Seek to the next resource and prepare for playback.

Only playback by URL is supported.

Returns
Indicates whether the current operation succeeded.

◆ 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.
Returns
Indicates whether the current operation succeeded.

◆ 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.
Returns
Indicates whether the current operation succeeded.

◆ moveToNextWithPrerendered

- (BOOL) moveToNextWithPrerendered

Seek to the next resource and prepare for playback.

Only playback by URL is supported.

Returns
Indicates whether the current operation succeeded.

◆ 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.
Returns
Indicates whether the current operation succeeded.

◆ 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.
Returns
Indicates whether the current operation succeeded.

◆ moveToPre

- (BOOL) moveToPre

Seek to the previous resource and prepare for playback.

Only playback by URL is supported.

Returns
Indicates whether the current operation succeeded.

◆ 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.
Returns
Indicates whether the current operation succeeded.

◆ 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.
Returns
Indicates whether the current operation succeeded.

◆ 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

◆ setOption:valueInt:

- (void) setOption: (PlayerOption) key
valueInt: (int) value 

Set player specific option (integer value).

Sets option parameters for specific player features. Some options accept integer-type values.

Parameters
keyOption key specifying the type of option to set
valueInteger representation of the option value
See also
PlayerOption

Implements AliPlayer.

◆ 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, see AVPSceneType

◆ setStrategyParam:strategyParam:

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

set strategy parameter.

Parameters
typestrategy type, see AVPStrategyType
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 playback.

Stops the current playback. Status changes are notified via AVPDelegate::onPlayerStatusChanged. After stopping, player resources are not automatically released. Call destroy or destroyAsync.

See also
AVPDelegate::onPlayerStatusChanged
AVPStatus
- destroy
- destroyAsync

Implements AliPlayer.

◆ updatePreloadConfig:

- (void) updatePreloadConfig: (AVPPreloadConfig *) config

update preload config related to uid

Parameters
uideach URL is a unique UID
configpreload config, see AVPPreloadConfig

◆ updatePreloadConfiguid:config:

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

update preload config

Parameters
configpreload config, see AVPPreloadConfig

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: