mirror of
https://github.com/zhw2590582/ArtPlayer.git
synced 2026-10-08 10:56:15 -08:00
feat: 增加动态设置字幕偏移功能,更新相关文档
This commit is contained in:
1 parent
36fb27d7a1
commit
211e9d22a2
6 files changed
+49
-4
No files matched your search
@@ -2551,7 +2551,7 @@ function subtitleOffsetMix(art) {
|
||||
set (value) {
|
||||
const { cues } = art.subtitle;
|
||||
if (!template.$track || cues.length === 0) return;
|
||||
const offset = (0, _utils.clamp)(value, -5, 5);
|
||||
const offset = (0, _utils.clamp)(value, -10, 10);
|
||||
template.$track.offset = offset;
|
||||
for(let index = 0; index < cues.length; index++){
|
||||
const cue = cues[index];
|
||||
|
||||
Reference in new issue
Block a user