-
Notifications
You must be signed in to change notification settings - Fork 154
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
compile error with svelte-kit #272
Comments
Same here, any solution? It's working fine on development but this error shows only while building the project |
Okay after debugging I came up with this solution: Create a file named <script>
import * as pkg from '@vime/core'
const { defineCustomElements, VmPlayer, VmVideo, VmDefaultUi } = pkg
defineCustomElements()
</script>
<vm-player autoplay muted>
<vm-video poster="/media/poster.png" cross-origin>
<source data-src="/media/video.mp4" type="video/mp4" />
<track default kind="subtitles" src="/media/subs/en.vtt" srclang="en" label="English" />
</vm-video>
<vm-default-ui />
</vm-player> |
@mihar-22 any comment on this? |
Jumped into discussion way to late but mine solution from a month ago was sapper like ssr import. Definetly not as elegant, but needed to make it work fast after switching from routify v2 to sveltekit.
|
None of the suggested solutions worked for me. It doesn't throw any errors, but it doesn't load the video either. |
copied Player.svelte code from the wetsite
run yarn svelte-kit build
got below exception
Run npm run preview to preview your production build locally.
import pkg from '@vime/core';
const { VmAudio, VmFile, VmCaptionControl, VmControl, VmIcon, VmTooltip, VmCaptions, VmClickToPlay, VmControlGroup, VmControlSpacer, VmControls, VmCurrentTime, VmTime, VmDailymotion, VmEmbed, VmDash, VmVideo, VmDblClickFullscreen, VmDefaultControls, VmEndTime, VmFullscreenControl, VmLiveIndicator, VmMuteControl, VmPipControl, VmPlaybackControl, VmScrim, VmScrubberControl, VmSlider, VmSettingsControl, VmTimeProgress, VmVolumeControl, VmDefaultSettings, VmMenu, VmMenuItem, VmMenuRadio, VmMenuRadioGroup, VmSettings, VmSubmenu, VmDefaultUi, VmLoadingScreen, VmPoster, VmSpinner, VmUi, VmHls, VmIconLibrary, VmPlayer, VmSkeleton, VmVimeo, VmYoutube } = pkg;
Caused by:
command failed
The text was updated successfully, but these errors were encountered: