VTT subtitle view main class.
More...
#include "AliVttSubtitleView.h"
VTT subtitle view main class.
Entry class for subtitle system, managing multi-track subtitle rendering. Implements AliVttSubtitleViewProtocol for player integration.
[player setExternalSubtitleView:subtitleView];
return [[CustomVttRenderImpl alloc]
init];
}];
VTT subtitle rendering implementation class.
Definition AliVttSubtitleView.h:404
VTT subtitle view main class.
Definition AliVttSubtitleView.h:900
instancetype init()
Initialize subtitle view.
◆ destroy
Destroy subtitle view and clean up all resources.
◆ getVttHeader:
Get VTT header information for specified track.
- Parameters
-
- Returns
- WebVttHeader object, returns nil if not found or not initialized
- Note
- This method returns parsed WebVTT header information, including style and region definitions
◆ hide:trackIndex:subtitleID:
| - (void) hide: |
|
(AliPlayer *) | player |
| trackIndex: |
|
(int) | trackIndex |
| subtitleID: |
|
(long) | subtitleID |
Hide subtitle.
- Parameters
-
| player | Player object |
| trackIndex | Track index |
| subtitleID | Subtitle ID |
◆ init
Initialize subtitle view.
- Returns
- Initialized subtitle view instance
◆ setConstClass:
| + (void) setConstClass: |
|
(Class) | constClass |
|
Set global constant class.
- Parameters
-
| constClass | Class object of constant class |
- Note
- Static method that affects default configuration of all instances
◆ setRenderImplFactory:
Set custom rendering implementation factory.
- Parameters
-
| factory | Rendering implementation factory block |
- Note
- Allows clients to provide custom rendering logic
◆ setVttHeader:trackIndex:Header:
| - (void) setVttHeader: |
|
(AliPlayer *) | player |
| trackIndex: |
|
(int) | trackIndex |
| Header: |
|
(NSString *) | header |
Set VTT header information.
- Parameters
-
| player | Player object |
| trackIndex | Track index |
| header | VTT header string |
◆ show:trackIndex:subtitleID:subtitle:
| - (void) show: |
|
(AliPlayer *) | player |
| trackIndex: |
|
(int) | trackIndex |
| subtitleID: |
|
(long) | subtitleID |
| subtitle: |
|
(NSString *) | subtitle |
Show subtitle.
- Parameters
-
| player | Player object |
| trackIndex | Track index |
| subtitleID | Subtitle ID |
| subtitle | Subtitle content |
◆ isEnableSubtitleRender
| - (BOOL) isEnableSubtitleRender |
|
readwriteatomicassign |
是否启用字幕渲染 Whether subtitle rendering is enabled
◆ renderFactory
客户自定义渲染实现工厂 Client custom rendering implementation factory
◆ renderMap
| - (NSMutableDictionary<NSNumber *, AliVttRender *>*) renderMap |
|
readwritenonatomicstrong |
轨道索引到渲染器的映射表 Mapping table from track index to renderer
The documentation for this class was generated from the following file: