-
Notifications
You must be signed in to change notification settings - Fork 22
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[wasm] MP4 example #753
[wasm] MP4 example #753
Conversation
a417c71
to
a527f14
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Move those projects to ts/examples
directory after #756 lands
ts/@live-compositor/browser-render/examples/counter/src/App.tsx
Outdated
Show resolved
Hide resolved
I'm preparing |
a527f14
to
4dad3e8
Compare
@@ -1,13 +1,16 @@ | |||
import { defineConfig } from 'vite'; | |||
import { viteStaticCopy } from 'vite-plugin-static-copy'; | |||
import { createRequire } from 'node:module'; | |||
|
|||
const require = createRequire(import.meta.url); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's a workaround for vite transforming the global require
const buffer = new Uint8ClampedArray(frame.allocationSize(frameOptions)); | ||
frame.copyTo(buffer, frameOptions); | ||
const buffer = new Uint8ClampedArray( | ||
frame.allocationSize(frameOptions as VideoFrameCopyToOptions) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
as VideoFrameCopyToOptions
is needed here because the default typings for VideoFrame
are missing format
field, even though format
is part of the web codecs spec
8b8dcc6
to
c420eda
Compare
btw if I open mp4 example, one of the chrome processes memory usage is 10GB. Is this expected? |
Added MP4 example for
@live-compositor/browser-render
. The example simply plays mp4 video with text component on top of it.Closes #730