AliyunPlayer v7.12.0
Aliyun Player API Reference Manual for iOS Platforms
Loading...
Searching...
No Matches
AVPVodAsset Class Reference

VodAsset playback source class. More...

#include "AVPSource.h"

Inheritance diagram for AVPVodAsset:
AVPSource

Instance Methods

(instancetype) - initWithJsonString:
 Initialize playback source with JSON string.
 
(instancetype) - initWithVid:clientRand:duration:playInfos:
 Initialize playback source with video ID, title, cover URL, duration and play info list.
 

Properties

BOOL adaptiveCodecEnable
 Whether to enable adaptive codec.
 
NSString * clientRand
 Client random number.
 
double duration
 Video duration.
 
NSArray< AVPVodPlayInfo * > * playInfos
 Play info list.
 
NSString * videoId
 Video ID.
 
- Properties inherited from AVPSource
NSString * coverURL
 The URL of the album cover.
 
NSString * definitions
 List of resolution types supported by VOD server.
 
BOOL forceQuality
 Whether to force the player to use the specified resolution.
 
NSString * quality
 The preferred definition for playback.
 
NSString * title
 The title of the video.
 

Detailed Description

VodAsset playback source class.

Plays media using pre-loaded video asset information.

Method Documentation

◆ initWithJsonString:

- (instancetype) initWithJsonString: (NSString *) jsonString

Initialize playback source with JSON string.

Creates a VodAsset object from a JSON string containing VideoBase and PlayInfoList information.

Parameters
jsonStringJSON string containing video information
Returns
Initialized AVPVodAsset instance, or nil if parsing fails

◆ initWithVid:clientRand:duration:playInfos:

- (instancetype) initWithVid: (NSString *) vid
clientRand: (NSString *) clientRand
duration: (double) duration
playInfos: (NSArray< AVPVodPlayInfo * > *) playInfos 

Initialize playback source with video ID, title, cover URL, duration and play info list.

Parameters
vidVideo ID
clientRandClient random number
durationVideo duration
playInfosPlay info list
Returns
Initialized AVPVodAsset instance

Property Documentation

◆ adaptiveCodecEnable

- (BOOL) adaptiveCodecEnable
readwritenonatomicassign

Whether to enable adaptive codec.

Default is YES

◆ clientRand

- (NSString*) clientRand
readwritenonatomiccopy

Client random number.

◆ duration

- (double) duration
readwritenonatomicassign

Video duration.

◆ playInfos

- (NSArray<AVPVodPlayInfo *>*) playInfos
readwritenonatomicstrong

Play info list.

◆ videoId

- (NSString*) videoId
readwritenonatomiccopy

Video ID.


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