FIX: Đã fix preview Media Explorer (v202608062345)
This commit is contained in:
@@ -11513,7 +11513,7 @@ const MEDIA_LIBRARY_SAMPLES = [
|
||||
{ name: "MIDI_Loop_06.mid", events: 88, lengthQn: 16, time: "0:08.000", tpqn: 480, bpm: 130, kind: "midi" }
|
||||
];
|
||||
|
||||
const MediaExplorerPanel = ({ height, clipboardRef }) => {
|
||||
const MediaExplorerPanel = ({ height, clipboardRef, active }) => {
|
||||
const [userFiles, setUserFiles] = React.useState([]);
|
||||
const [folder, setFolder] = React.useState('library');
|
||||
const [selected, setSelected] = React.useState(null);
|
||||
@@ -12651,6 +12651,12 @@ const MediaExplorerPanel = ({ height, clipboardRef }) => {
|
||||
setIsPaused(false);
|
||||
}, []);
|
||||
|
||||
// F6 close / panel bị ẩn (display:none — KHÔNG unmount) → tắt preview âm
|
||||
// thanh (trước đây preview tiếp tục phát sau khi đóng Media Explorer).
|
||||
React.useEffect(function() {
|
||||
if (active === false) stopMediaPlayback();
|
||||
}, [active, stopMediaPlayback]);
|
||||
|
||||
const playSelected = async (f, token) => {
|
||||
if (!f) return;
|
||||
stopMediaPlayback();
|
||||
@@ -27496,7 +27502,8 @@ STRICT CONSTRAINTS:
|
||||
className: "flex-1 min-h-0 overflow-hidden bg-[#262626]"
|
||||
}, /*#__PURE__*/React.createElement(MediaExplorerPanel, {
|
||||
height: mediaExplorerPanelHeight,
|
||||
clipboardRef: clipboardRef
|
||||
clipboardRef: clipboardRef,
|
||||
active: showMediaExplorer
|
||||
}))));
|
||||
})(), /*#__PURE__*/React.createElement("div", {
|
||||
className: "h-6 bg-[#141414] border-t border-zinc-900 px-4 flex items-center justify-between text-xs text-zinc-500 select-none shrink-0"
|
||||
|
||||
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user