1.加入注释区分转写类型type.

This commit is contained in:
amass 2023-06-21 19:28:22 +08:00
parent f30bf34432
commit 561ce68b70
2 changed files with 12 additions and 2 deletions

View File

@ -46,7 +46,12 @@ function fetchRecord(accessToken, record) {
blob => blob.text()
).then(text => {
// console.log("type", record.type, text);
let payload = record.type === 1 ? JSON.parse(text) : text;
let payload = null;
if (record.type === 1 || record.type === 3) {
payload = JSON.parse(text)
} else {
payload = text;
}
store.dispatch(setCurrentLyric(payload));
});
}
@ -136,7 +141,7 @@ export default function () {
}
const handleResize = () => {
console.log("innerWidth", document.documentElement.clientWidth, document.documentElement.clientWidth - (open ? 240 : 0) - 48)
// console.log("innerWidth", document.documentElement.clientWidth, document.documentElement.clientWidth - (open ? 240 : 0) - 48)
setPlayerBarWidth(document.documentElement.clientWidth - (open ? 240 : 0) - 48);
}

View File

@ -1,5 +1,10 @@
import { createSlice } from '@reduxjs/toolkit'
// type: 0 --> 声文速记 纯文本,已适配
// type: 1 --> 导入音频
// type: 2 --> 同传翻译 纯文本,已适配
// type: 3 --> 双语对话
export const recorderSlice = createSlice({
name: 'recorder',
initialState: {