feat: 增加字幕相关属性和事件,优化字幕切换逻辑

This commit is contained in:
Harvey Zack committed 2024-09-14 16:14:59 +08:00
1 parent a0b6af32d0
commit 2b11d897ff
11 files changed
+38 -27

No files matched your search

+4
View File
@@ -11,6 +11,10 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
- 新增 `artplayer-proxy-webav` 代理,来自 [bilibili/WebAV](https://github.com/bilibili/WebAV)
- 新增 `option.thumbnails.scale`, 用于预览图缩放
- 修复更改 `art.url` 不能触发 `autoPlayBack` 的 `bug`: [#797](https://github.com/zhw2590582/ArtPlayer/issues/797)
- 新增 `art.subtitle.cues` 属性, 可用于手动调整字幕对象列表
- 新增 `subtitleBeforeUpdate` 事件, 在字幕元素渲染前触发
- 修改 `subtitleUpdate` 事件为 `subtitleAfterUpdate`, 在字幕元素渲染后触发
- 新增 `subtitleTrackLoad` 事件, 在字幕 `url` 挂载在 `HTMLTrackElement` 成功后触发
## [5.1.7] - 2024-8-15