What the recommended method of using local video assets? (to also see it in the plasmic UI)
Currently, I’m keeping the Source URL: unset, and update it from the code.
This works fine on local version and deployed one, but not in the plasmic interface, and the flow starts to split up working like this.
Ofc, I can use GIF instead of MP4, or to upload it on a video hosting platform, but I noticed a major difference speed of loading speed in my case.
Hi @impressive_cardinal, have you already set up app hosting? Is there still a discrepancy in that case?
Yes, I think that I configured it correctly, as it is mentioned in the docs.
But I’m referring to the video assets that are not hosted on an external platform like youtube, dropbox, etc.
For now, the workaround is to make sure that everytime I push anytime from plasmic side I revert the source of the video. Here how I use it in the code:
import video from './video.mp4';
... other attributes
And since I’m using Gatsby, everything works as expected and super fast.
Alternatively, I could have create a code component based on video component, and register it, I think.
Oh! I understand now.
You’re right, the built-in version of this component does not support importing local paths if those imports depend on your bundler support.
You should still be able to import local assets just by their public URL route though (which is what I thought was meant originally). It might look something like /static/video.mp4.
But if you would like to use import paths that depend on your bundler, then a local code component is indeed the way to go!