Fix SSR issue
This commit is contained in:
parent
479e9f8ecb
commit
a1edcd9d92
@ -93,7 +93,7 @@ const config = {
|
||||
items: [
|
||||
{
|
||||
label: "Tutorial",
|
||||
to: "/docs/intro",
|
||||
to: "/docs/overview",
|
||||
},
|
||||
],
|
||||
},
|
||||
|
@ -1,9 +1,4 @@
|
||||
import Playground from "@site/src/components/Playground";
|
||||
import CoreSwitcher from "@site/src/components/Playground/CoreSwitcher";
|
||||
import FileSystemManager from
|
||||
"@site/src/components/Playground/Workspace/FileSystemManager";
|
||||
import Editor from
|
||||
"@site/src/components/Playground/Workspace/Editor";
|
||||
import BrowserOnly from '@docusaurus/BrowserOnly';
|
||||
import MuiThemeProvider from "@site/src/components/common/MuiThemeProvider";
|
||||
import ThemedButton from "@site/src/components/common/ThemedButton";
|
||||
import ThemedIconButton from "@site/src/components/common/ThemedIconButton";
|
||||
@ -26,7 +21,12 @@ development!
|
||||
|
||||
:::
|
||||
|
||||
<Playground />
|
||||
<BrowserOnly>
|
||||
{() => {
|
||||
const Playground = require('@site/src/components/Playground').default;
|
||||
return <Playground/>
|
||||
}}
|
||||
</BrowserOnly>
|
||||
|
||||
<div style={{ height: 32 }} />
|
||||
|
||||
@ -48,7 +48,12 @@ The assets are downloaded automatically when you enter the Playground. You can
|
||||
choose to use multithreading version instead by click on the switch:
|
||||
|
||||
<MuiThemeProvider>
|
||||
<CoreSwitcher />
|
||||
<BrowserOnly>
|
||||
{() => {
|
||||
const CoreSwitcher = require('@site/src/components/Playground/CoreSwitcher').default;
|
||||
return <CoreSwitcher/>;
|
||||
}}
|
||||
</BrowserOnly>
|
||||
</MuiThemeProvider>
|
||||
|
||||
#### Load files to in-memory File System
|
||||
@ -58,6 +63,10 @@ System to make sure these files can be consumed by the ffmpeg.wasm APIs:
|
||||
|
||||
<div style={{ maxWidth: 260 }}>
|
||||
<MuiThemeProvider>
|
||||
<BrowserOnly>
|
||||
{() => {
|
||||
const FileSystemManager = require('@site/src/components/Playground/Workspace/FileSystemManager').default;
|
||||
return (
|
||||
<FileSystemManager
|
||||
nodes={[
|
||||
{name: "..", isDir: true},
|
||||
@ -68,6 +77,9 @@ System to make sure these files can be consumed by the ffmpeg.wasm APIs:
|
||||
{name: "video.avi", isDir: false},
|
||||
]}
|
||||
/>
|
||||
);
|
||||
}}
|
||||
</BrowserOnly>
|
||||
</MuiThemeProvider>
|
||||
</div>
|
||||
|
||||
@ -92,7 +104,14 @@ and hit <ThemedButton variant="contained">Run</ThemedButton> afterward:
|
||||
|
||||
<div style={{ maxWidth: 480 }}>
|
||||
<MuiThemeProvider>
|
||||
<BrowserOnly>
|
||||
{() => {
|
||||
const Editor = require('@site/src/components/Playground/Workspace/Editor').default;
|
||||
return (
|
||||
<Editor args={JSON.stringify(["-i", "video.avi", "video.mp4"], null, 2)} />
|
||||
);
|
||||
}}
|
||||
</BrowserOnly>
|
||||
</MuiThemeProvider>
|
||||
</div>
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user