mirror of
https://github.com/zhw2590582/ArtPlayer.git
synced 2026-10-29 19:41:25 -08:00
feat: update subtitle properties and events to enhance cue management and retrieval
This commit is contained in:
1 parent
8ea85476e0
commit
c0c5a12010
20 files changed
+4319
-2276
No files matched your search
@@ -312,6 +312,9 @@ Manage the subtitle features of the player
|
||||
- `url` property sets and returns the current subtitle address
|
||||
- `style` method sets the style of the current subtitle
|
||||
- `switch` method sets the current subtitle address and options
|
||||
- `textTrack` Get the current subtitle track
|
||||
- `activeCues` Get the currently active subtitle list
|
||||
- `cues` Get the the subtitle list
|
||||
|
||||
<div className="run-code">▶ Run Code</div>
|
||||
|
||||
|
||||
@@ -587,8 +587,8 @@ var art = new Artplayer({
|
||||
},
|
||||
});
|
||||
|
||||
art.on('subtitleBeforeUpdate', (cue) => {
|
||||
console.info('subtitleBeforeUpdate', cue);
|
||||
art.on('subtitleBeforeUpdate', (cues) => {
|
||||
console.info('subtitleBeforeUpdate', cues);
|
||||
});
|
||||
```
|
||||
|
||||
@@ -607,8 +607,8 @@ var art = new Artplayer({
|
||||
},
|
||||
});
|
||||
|
||||
art.on('subtitleAfterUpdate', (cue) => {
|
||||
console.info('subtitleAfterUpdate', cue);
|
||||
art.on('subtitleAfterUpdate', (cues) => {
|
||||
console.info('subtitleAfterUpdate', cues);
|
||||
});
|
||||
```
|
||||
|
||||
@@ -628,7 +628,7 @@ var art = new Artplayer({
|
||||
});
|
||||
|
||||
art.on('subtitleLoad', (option, cues) => {
|
||||
console.info('subtitleLoad', option, cues);
|
||||
console.info('subtitleLoad', cues, option);
|
||||
});
|
||||
```
|
||||
|
||||
|
||||
Reference in new issue
Block a user