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

VID和PlayAuth播放源类 More...

#include "AVPSource.h"

Inheritance diagram for AVPVidAuthSource:
AVPSource

Instance Methods

(instancetype) - initWithVid:playAuth:region:
 使用VID和PlayAuth初始化播放源
(instancetype) - initWithVid:playAuth:region:format:playConfig:
 使用VID、PlayAuth、格式和配置初始化播放源
(instancetype) - initWithVid:playAuth:region:playConfig:
 使用VID、PlayAuth和播放配置初始化播放源

Properties

long authTimeout
 鉴权超时时间
NSString * digitalWatermarkType
 数字水印类型 TraceMark:溯源水印。 CopyrightMark:版权水印
BOOL enableAdaptiveCodec
 启用多编码格式自适应功能。 根据设备对视频编码格式的支持能力,自动选择当前清晰度下最优的视频流。
NSString * format
 媒体格式
NSString * outputType
 输出类型 oss:回源地址。 cdn(默认):加速地址。
NSString * playAuth
 播放鉴权令牌
NSString * playConfig
 播放配置
NSString * reAuthInfo
 二次鉴权信息
NSString * region
 地域信息
NSString * resultType
 结果类型 Single(默认):每种清晰度和格式只返回一路最新转码完成的流。 Multiple:每种清晰度和格式返回所有转码完成的流。
NSString * streamType
 流类型 video/audio
NSString * trace
 用户自定义的数字水印信息
NSString * vid
 视频ID
Properties inherited from AVPSource
NSString * coverURL
 媒体封面URL 媒体的封面或海报图片的URL地址。
NSString * definitions
 点播服务器支持的清晰度类型列表
BOOL forceQuality
 是否强制使用指定的清晰度
NSString * quality
 期望播放的清晰度
NSString * title
 视频标题

Detailed Description

VID和PlayAuth播放源类

使用阿里云视频ID和播放鉴权令牌进行身份验证和授权后播放媒体。 这是阿里云推荐的认证方式,可应用于大多数场景。

Method Documentation

◆ initWithVid:playAuth:region:

- (instancetype) initWithVid: (NSString *) vid
playAuth: (NSString *) playAuth
region: (NSString *) region 

使用VID和PlayAuth初始化播放源

创建使用播放鉴权令牌进行身份验证的播放源。

Parameters
vid阿里云视频ID
playAuth播放鉴权令牌,由服务端生成
region视频所在地域
Returns
初始化后的AVPVidAuthSource实例

◆ initWithVid:playAuth:region:format:playConfig:

- (instancetype) initWithVid: (NSString *) vid
playAuth: (NSString *) playAuth
region: (NSString *) region
format: (NSString *) format
playConfig: (NSString *) playConfig 

使用VID、PlayAuth、格式和配置初始化播放源

Parameters
vid阿里云视频ID
playAuth播放鉴权令牌
region视频所在地域
format媒体格式
playConfig自定义播放配置
Returns
初始化后的AVPVidAuthSource实例

◆ initWithVid:playAuth:region:playConfig:

- (instancetype) initWithVid: (NSString *) vid
playAuth: (NSString *) playAuth
region: (NSString *) region
playConfig: (NSString *) playConfig 

使用VID、PlayAuth和播放配置初始化播放源

Parameters
vid阿里云视频ID
playAuth播放鉴权令牌
region视频所在地域
playConfig自定义播放配置
Returns
初始化后的AVPVidAuthSource实例

Property Documentation

◆ authTimeout

- (long) authTimeout
readwritenonatomicassign

鉴权超时时间

PlayAuth鉴权的超时时间,单位为毫秒。

◆ digitalWatermarkType

- (NSString*) digitalWatermarkType
readwritenonatomiccopy

数字水印类型 TraceMark:溯源水印。 CopyrightMark:版权水印

◆ enableAdaptiveCodec

- (BOOL) enableAdaptiveCodec
readwritenonatomicassign

启用多编码格式自适应功能。 根据设备对视频编码格式的支持能力,自动选择当前清晰度下最优的视频流。

注意:

  • 需配合将 resultType 设为 Multiple 才能启用多编码流支持;
  • 仅在使用 VidAuthVidSts 媒体源时生效,推荐优先使用 VidAuth。
See also
resultType

Enables adaptive multi-codec streaming. Automatically selects the optimal video stream for the current playback quality based on device codec support.

Note:

  • Requires resultType to be set to Multiple to enable multi-codec stream availability;
  • Only effective when using VidAuth or VidSts media sources. VidAuth is recommended.
See also
resultType

◆ format

- (NSString*) format
readwritenonatomiccopy

媒体格式

指定媒体的格式类型。多个格式用逗号分隔,如"mp4,mp3,flv,m3u8"。

◆ outputType

- (NSString*) outputType
readwritenonatomiccopy

输出类型 oss:回源地址。 cdn(默认):加速地址。

◆ playAuth

- (NSString*) playAuth
readwritenonatomiccopy

播放鉴权令牌

由服务端生成的播放鉴权令牌,用于验证播放权限。

◆ playConfig

- (NSString*) playConfig
readwritenonatomiccopy

播放配置

自定义的播放配置,JSON格式。构造方式参考

◆ reAuthInfo

- (NSString*) reAuthInfo
readwritenonatomiccopy

二次鉴权信息

CDN 二次鉴权参数,为 JSON 字符串。当开启了 URL 鉴权的 A 方式鉴权功能时,可通过该参数设置鉴权 URL 的uid和rand,请参见鉴权方式 A 说明 <a href="https://help.aliyun.com/zh/vod/user-guide/type-a-signing

◆ region

- (NSString*) region
readwritenonatomiccopy

地域信息

视频所在的阿里云地域标识。

◆ resultType

- (NSString*) resultType
readwritenonatomiccopy

结果类型 Single(默认):每种清晰度和格式只返回一路最新转码完成的流。 Multiple:每种清晰度和格式返回所有转码完成的流。

◆ streamType

- (NSString*) streamType
readwritenonatomiccopy

流类型 video/audio

◆ trace

- (NSString*) trace
readwritenonatomiccopy

用户自定义的数字水印信息

digitalWatermark info

◆ vid

- (NSString*) vid
readwritenonatomiccopy

视频ID

阿里云视频ID,唯一标识一个视频资源。


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