优化字幕复制

This commit is contained in:
IndieKKY
2024-03-18 19:17:02 +08:00
parent e6db674755
commit 2ba841c8f2
4 changed files with 15 additions and 6 deletions

View File

@@ -12,6 +12,7 @@ import {
setSegments,
setTitle,
setTotalHeight,
setUrl,
} from '../redux/envReducer'
import {EventBusContext} from '../Router'
import {
@@ -55,6 +56,7 @@ const useSubtitleService = () => {
if (data.type === 'setVideoInfo') {
dispatch(setInfos(data.infos))
dispatch(setUrl(data.url))
dispatch(setTitle(data.title))
console.debug('video title: ', data.title)
}
@@ -86,7 +88,6 @@ const useSubtitleService = () => {
if (data.data.totalHeight) {
dispatch(setTotalHeight(Math.min(Math.max(data.data.totalHeight, TOTAL_HEIGHT_MIN), TOTAL_HEIGHT_MAX)))
}
console.debug('setSettings', data.data)
}
}