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

VTT subtitle location attribute class. More...

#include "AliVttSubtitleView.h"

Inheritance diagram for VttLocationAttribute:

Class Methods

(int) + ALIGN_CENTER
 
(int) + ALIGN_END
 
(int) + ALIGN_START
 已废弃:返回值(1/2/3)与 mAlignment 实际存储值不一致,请改用 AVPVttAlign 枚举。 Deprecated: return values (1/2/3) do not match what mAlignment actually stores.
 

Properties

AVPVttAlign align
 文本对齐方式(native 忠实值),取值见 AVPVttAlign(与 native webvtt_align_e 一致);业务方请优先读此字段 Text alignment (native-faithful), see AVPVttAlign (identical to native webvtt_align_e); prefer this over mAlignment
 
int mAlignment
 已废弃:请改用 align(AVPVttAlign)。此字段为 int,取值不保证与 native 一致,保留仅为兼容旧接入方。 Deprecated: use align (AVPVttAlign) instead.
 
double mAngle
 旋转角度,单位为度 Rotation angle in degrees
 
int marginL
 左边距,单位为像素 Left margin in pixels
 
int marginR
 右边距,单位为像素 Right margin in pixels
 
int marginV
 垂直边距,单位为像素 Vertical margin in pixels
 
double mScaleX
 水平缩放比例,1.0为原始大小 Horizontal scale ratio, 1.0 is original size
 
double mScaleY
 垂直缩放比例,1.0为原始大小 Vertical scale ratio, 1.0 is original size
 
int mSizeType
 cue size 数值的类型:-1=未设置, 0=百分比, 1=px, 2=行号(对应 webvtt_value_type_e) Type of cue size value: -1=invalid, 0=percentage, 1=px, 2=line number (webvtt_value_type_e)
 
double mSizeValue
 cue size 的数值(如 size:18% 则为 18)。仅透传解析结果,SDK 渲染不使用;未设置时为 0 Numeric value of cue size (e.g.
 
double posX
 X坐标位置,单位为像素 X coordinate position in pixels.
 
double posY
 Y坐标位置,单位为像素 Y coordinate position in pixels.
 

Detailed Description

VTT subtitle location attribute class.

Encapsulates position, alignment, margin, and transformation information of subtitles on screen. Supports position control features of the WebVTT standard.

Method Documentation

◆ ALIGN_CENTER

+ (int) ALIGN_CENTER

◆ ALIGN_END

+ (int) ALIGN_END

◆ ALIGN_START

+ (int) ALIGN_START

已废弃:返回值(1/2/3)与 mAlignment 实际存储值不一致,请改用 AVPVttAlign 枚举。 Deprecated: return values (1/2/3) do not match what mAlignment actually stores.

Use AVPVttAlign.

Property Documentation

◆ align

- (AVPVttAlign) align
readwritenonatomicassign

文本对齐方式(native 忠实值),取值见 AVPVttAlign(与 native webvtt_align_e 一致);业务方请优先读此字段 Text alignment (native-faithful), see AVPVttAlign (identical to native webvtt_align_e); prefer this over mAlignment

◆ mAlignment

- (int) mAlignment
readwritenonatomicassign

已废弃:请改用 align(AVPVttAlign)。此字段为 int,取值不保证与 native 一致,保留仅为兼容旧接入方。 Deprecated: use align (AVPVttAlign) instead.

This int field is not guaranteed to match native values; kept only for backward compatibility.

◆ mAngle

- (double) mAngle
readwritenonatomicassign

旋转角度,单位为度 Rotation angle in degrees

◆ marginL

- (int) marginL
readwritenonatomicassign

左边距,单位为像素 Left margin in pixels

◆ marginR

- (int) marginR
readwritenonatomicassign

右边距,单位为像素 Right margin in pixels

◆ marginV

- (int) marginV
readwritenonatomicassign

垂直边距,单位为像素 Vertical margin in pixels

◆ mScaleX

- (double) mScaleX
readwritenonatomicassign

水平缩放比例,1.0为原始大小 Horizontal scale ratio, 1.0 is original size

◆ mScaleY

- (double) mScaleY
readwritenonatomicassign

垂直缩放比例,1.0为原始大小 Vertical scale ratio, 1.0 is original size

◆ mSizeType

- (int) mSizeType
readwritenonatomicassign

cue size 数值的类型:-1=未设置, 0=百分比, 1=px, 2=行号(对应 webvtt_value_type_e) Type of cue size value: -1=invalid, 0=percentage, 1=px, 2=line number (webvtt_value_type_e)

◆ mSizeValue

- (double) mSizeValue
readwritenonatomicassign

cue size 的数值(如 size:18% 则为 18)。仅透传解析结果,SDK 渲染不使用;未设置时为 0 Numeric value of cue size (e.g.

18 for size:18%). Pass-through only, not used by rendering; 0 when unset

◆ posX

- (double) posX
readwritenonatomicassign

X坐标位置,单位为像素 X coordinate position in pixels.

◆ posY

- (double) posY
readwritenonatomicassign

Y坐标位置,单位为像素 Y coordinate position in pixels.


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