Skip to content

Commit

Permalink
允许选取音频,修复滚动
Browse files Browse the repository at this point in the history
  • Loading branch information
solidSpoon committed Mar 15, 2024
1 parent 19c86fa commit 7d5d97f
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
4 changes: 2 additions & 2 deletions src/common/utils/MediaTypeUitl.ts
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
// ".mp4,.webm,.wav,.srt"

export const ACCEPTED_FILE_TYPES = '.mp4,.webm,.wav,.srt';
export const ACCEPTED_FILE_TYPES = '.mp4,.webm,.wav,.srt,.mp3,.m4a';

export const isVideo = (path: string): boolean => {
return (
path.endsWith('.mp4') || path.endsWith('.wav') || path.endsWith('.webm')
path.endsWith('.mp4') || path.endsWith('.wav') || path.endsWith('.webm') || path.endsWith('.mp3') || path.endsWith('.m4a')
);
};

Expand Down
4 changes: 3 additions & 1 deletion src/fronted/hooks/useSubtitleScroll.ts
Original file line number Diff line number Diff line change
Expand Up @@ -222,7 +222,9 @@ const useSubtitleScroll = create(
set({ scrollState: 'PAUSE_MEASUREMENT' });
setTimeout(() => {
set({ scrollState });
useSubtitleScroll.getState().onScrolling();
if (!useLayout.getState().showSideBar) {
useSubtitleScroll.getState().onScrolling();
}
}, 500);
},
delaySetNormal,
Expand Down

0 comments on commit 7d5d97f

Please sign in to comment.