fix undefined issue
This commit is contained in:
@@ -64,9 +64,7 @@ export const MediaCurrentRecording = () => {
|
||||
currentTime: mediaCurrentTime,
|
||||
} = useContext(MediaPlayerProviderContext);
|
||||
const { webApi, EnjoyApp } = useContext(AppSettingsProviderContext);
|
||||
const { currentHotkeys } = useContext(
|
||||
HotKeysSettingsProviderContext
|
||||
);
|
||||
const { currentHotkeys } = useContext(HotKeysSettingsProviderContext);
|
||||
const [player, setPlayer] = useState(null);
|
||||
const [regions, setRegions] = useState<Regions | null>(null);
|
||||
const [currentTime, setCurrentTime] = useState(0);
|
||||
@@ -423,7 +421,7 @@ export const MediaCurrentRecording = () => {
|
||||
}, [currentRecording, isRecording, layout?.width]);
|
||||
|
||||
useHotkeys(currentHotkeys.PlayOrPauseRecording, () => {
|
||||
document.getElementById("recording-play-or-pause-button").click();
|
||||
document.getElementById("recording-play-or-pause-button")?.click();
|
||||
});
|
||||
useHotkeys(currentHotkeys.PronunciationAssessment, () => {
|
||||
setDetailIsOpen(!detailIsOpen);
|
||||
|
||||
@@ -29,7 +29,7 @@ export const MediaProvider = () => {
|
||||
const player = useRef<MediaPlayerInstance>(null);
|
||||
|
||||
useEffect(() => {
|
||||
if (!transcription?.result) return;
|
||||
if (!transcription?.result?.timeline) return;
|
||||
if (!player?.current) return;
|
||||
|
||||
const srt = transcription.result.timeline
|
||||
|
||||
Reference in New Issue
Block a user