@scarlett-player/native
v0.4.0
Published
Native Video Provider Plugin for Scarlett Player (MP4, WebM, MOV, MKV)
Maintainers
Readme
@scarlett-player/native
Native video playback plugin for Scarlett Player. Supports MP4, WebM, MOV, MKV, and OGV formats.
Installation
npm install @scarlett-player/core @scarlett-player/nativeUsage
import { ScarlettPlayer } from '@scarlett-player/core';
import { createNativePlugin } from '@scarlett-player/native';
const player = new ScarlettPlayer({
container: document.getElementById('player'),
plugins: [createNativePlugin()],
});
await player.init();
await player.load('https://example.com/video.mp4');Supported Formats
- MP4 - H.264/AAC (most common)
- WebM - VP8/VP9/Opus
- MOV - QuickTime (H.264/AAC)
- MKV - Matroska (browser support varies)
- OGV/OGG - Theora/Vorbis
Configuration
createNativePlugin({
preload: 'metadata', // 'none' | 'metadata' | 'auto'
});License
MIT
