Package detail

twitch-video-element

muxinc203.2kMIT0.1.4

A custom element for the Twitch player with an API that matches the <video> API

twitch, video, player, web component

readme

<twitch-video>

NPM Version NPM Downloads jsDelivr hits (npm) npm bundle size

A custom element for the Twitch player with an API that matches the <video> API.

Example

<script type="module" src="https://cdn.jsdelivr.net/npm/twitch-video-element@0.1/+esm"></script>
<twitch-video controls src="https://www.twitch.tv/videos/106400740"></twitch-video>

Install

First install the NPM package:

npm install twitch-video-element

Import in your app javascript (e.g. src/App.js):

import 'twitch-video-element';

Optionally, you can load the script directly from a CDN using JSDelivr:

<script type="module" src="https://cdn.jsdelivr.net/npm/twitch-video-element@0.1/+esm"></script>

This will register the custom elements with the browser so they can be used as HTML.

Related