mirror of
https://github.com/zoriya/v10.git
synced 2026-08-16 02:45:09 +00:00
19 lines
497 B
TypeScript
19 lines
497 B
TypeScript
// HTML sandbox — Web player (DOM/Browser)
|
|
// http://localhost:5173/html/
|
|
|
|
import { createPlayer, features, MediaElement } from '@videojs/html';
|
|
|
|
const { PlayerElement } = createPlayer({
|
|
features: features.video,
|
|
});
|
|
|
|
customElements.define('video-player', PlayerElement);
|
|
|
|
const html = String.raw;
|
|
|
|
document.getElementById('root')!.innerHTML = html`
|
|
<video-player>
|
|
<video src="https://stream.mux.com/lhnU49l1VGi3zrTAZhDm9LUUxSjpaPW9BL4jY25Kwo4/highest.mp4"></video>
|
|
</video-player>
|
|
`;
|