Skip to content

Instantly share code, notes, and snippets.

@spences10
Created October 26, 2021 17:16
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save spences10/09ec6198ac542d0ba8561603db388239 to your computer and use it in GitHub Desktop.
Save spences10/09ec6198ac542d0ba8561603db388239 to your computer and use it in GitHub Desktop.
<script>
import { onMount } from 'svelte';
export let src;
let showPlayer = false;
let player;
onMount(async () => {
const { defineCustomElements } = await import('@vime/core');
defineCustomElements();
showPlayer = true;
});
</script>
{#if showPlayer}
<vm-player bind:this={player}>
<vm-video>
<source data-src={src} type="video/mp4" />
</vm-video>
<vm-ui>
<vm-default-controls />
</vm-ui>
</vm-player>
{/if}
@ashishagarwal2023
Copy link

What's this?

@spences10
Copy link
Author

It's an example of using Vimejs with SvelteKit

@ashishagarwal2023
Copy link

@spences10 Oh!!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment