forked from 77media/video-flow
更新MediaViewer组件,修改handleEditClick函数以支持从'final'标签暂停视频播放,并在编辑按钮点击事件中传递该参数,提升用户交互体验。
This commit is contained in:
parent
4f31df7fe7
commit
863858bcb6
@ -147,7 +147,11 @@ export function MediaViewer({
|
||||
};
|
||||
|
||||
// 包装编辑按钮点击事件
|
||||
const handleEditClick = (tab: string) => {
|
||||
const handleEditClick = (tab: string, from?: string) => {
|
||||
if (from === 'final') {
|
||||
// 暂停视频播放
|
||||
finalVideoRef.current?.pause();
|
||||
}
|
||||
// TODO 点击没有任何事件效果,页面没变化
|
||||
setUserHasInteracted(true);
|
||||
onEditModalOpen(tab);
|
||||
@ -348,7 +352,7 @@ export function MediaViewer({
|
||||
<GlassIconButton
|
||||
icon={Edit3}
|
||||
tooltip="Edit sketch"
|
||||
onClick={() => handleEditClick('4')}
|
||||
onClick={() => handleEditClick('4', 'final')}
|
||||
/>
|
||||
</motion.div>
|
||||
)}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user