React, Vue and Svelte video player โ
movi-player ships first-party components for React, Vue 3 and Svelte inside the main package. They are thin, typed wrappers over the same engine, so everything the element plays โ MKV, HEVC, AV1, HLS, DASH, multi-audio, subtitles โ plays from your framework, and every attribute is a prop.
npm install movi-playerReact โ
import { MoviPlayer } from "movi-player/react";
export function Watch() {
return (
<MoviPlayer
src="https://example.com/movie.mkv"
controls
thumb
onReady={(el) => console.log("duration", el.duration)}
/>
);
}ref forwards the underlying element, so ref.current.play() and the rest of its API are typed.
Next.js โ
Render the player from a client component, since it needs the browser's media APIs:
"use client";
import { MoviPlayer } from "movi-player/react";
export default function Player({ src }: { src: string }) {
return <MoviPlayer src={src} controls />;
}Vue 3 โ
<script setup lang="ts">
import { MoviPlayer } from "movi-player/vue";
</script>
<template>
<MoviPlayer src="https://example.com/stream.m3u8" controls />
</template>Svelte โ
<script>
import MoviPlayer from "movi-player/svelte";
let player;
</script>
<MoviPlayer bind:element={player} src="https://example.com/manifest.mpd" controls />Slim build โ
Every wrapper has a /slim twin with the same props. It keeps the WebAssembly engine as a separate movi.wasm, which you host next to your bundle:
import { MoviPlayer } from "movi-player/react/slim";
<MoviPlayer src="video.mkv" controls wasmurl="/movi.wasm" />;Use one entry per app โ importing both the default and the slim build ships the engine twice.
Try it โ
Every attribute on the examples page works as a prop. For streaming specifics see the HLS and DASH guides.
FAQ โ
Is there a React video player that plays MKV and HEVC? โ
Yes. movi-player ships a React component at movi-player/react that wraps the same engine, so MKV, HEVC, HLS and DASH all play from React.
Do I need a separate package for Vue or Svelte? โ
No. The wrappers ship inside the main package: movi-player/react, movi-player/vue and movi-player/svelte.
Does it work with Next.js? โ
Yes, from a client component. The player needs the browser's media APIs, so render it on the client rather than during server rendering.
What is the slim build? โ
Each wrapper has a /slim twin that keeps the WebAssembly engine as a separate movi.wasm file, so the JavaScript is smaller and the WASM is cached on its own.