Closed bennobuilder closed 1 month ago
This does not seem the right way to fix it.
Both useMediaPlayback
and BufferingProvider is internal API from Remotion.
It seems like Vidstack does not use it either, so I think the actual problem here is a version mismatch! If multiple versions of Remotion are in a project, then the React contexts don't work anymore.
Can you check your lockfile if this is the case?
@JonnyBurger Good point 👍
But although I use the same Remotion Version across the packages, it still can't identify the BufferingContextReact
🤷
Remotion Versions in use (Verified via Dependency Tree)
@repo/web
Remotion Version: 4.0.193
@repo/video
Remotion Version: 4.0.193
@vidstack/react
Remotion Version: 4.0.193
[Dev Dependency]Hmm yes that looks right.
I tried it myself and actually it worked! https://www.vidstack.io/docs/player/getting-started/installation/react?provider=remotion&styling=default-layout
Can you compare what's different between the Vidstack Example and yours?
(Although the scaling and positioning of the Remotion Player doesn't seem correct cc @mihar-22)
I’ll look into it as soon as I can! Sorry for this issue landing here, prefer it be raised in our repo first. Feel free to close and I’ll address any sizing issues from our end :)
I’ll look into it as soon as I can! Sorry for this issue landing here, prefer it be raised in our repo first. Feel free to close and I’ll address any sizing issues from our end :)
The sizing issue can be fixed with:
[data-remotion-container='true'] {
transform-origin: top left;
}
@JonnyBurger You're right a basic example setup with Vite also works for me 🚀
then I've to figure out why it doesn't work in my other project. The only difference is that the Remotion composition is a separate package so that I can import it into my backend and frontend. But this has nothing to do with this "Feature Request" anymore so I'll close the issue.
cheers and thanks for the help :)
@JonnyBurger @mihar-22 It looks like the issue is related to the Audio
component. Adding the Remotion Audio
component causes the same error I encountered in the other project.
"useMediaPlayback must be used inside a <BufferingContext>"
But I think this is an issue for the vidstack/player
repo?
pnpm create vite my-remotion-app --template react-ts
pnpm install @vidstack/react@next remotion
RemotionVideo.tsx
(based on with Audio)
Edit src/App.tsx
and save to test HMR
Click on the Vite and React logos to learn more
Feature Request 🛍️
The
BufferingContextReact
required byuseMediaPlayback
is currently not provided by Vidstack (Player), causing the following error:Use Case
Make Remotion work with Vidstack (Remotion Provider) by ensuring the
BufferingContextReact
is available foruseMediaPlayback
.Possible Solution
BufferingProvider
innode_modules
or automate this via a script.BufferingProvider
from the Remotioncore
package to ensureBufferingContextReact
is accessible inuseMediaPlayback
.