Web component
frameworkA <tomato-player> custom element configured with HTML attributes.
Loading the custom element…
skin attribute
Changing the attribute swaps the skin on the live element. The same element is in the CDN build, so it also works with a single script tag and no bundler.
Open the no-build CDN pageThe code
html<script type="module">import 'tomato-player/element';</script><tomato-playersrc="https://upload.wikimedia.org/wikipedia/commons/transcoded/c/c0/Big_Buck_Bunny_4K.webm/Big_Buck_Bunny_4K.webm.720p.vp9.webm"poster="/tomato-player/media/poster.jpg"title="Big Buck Bunny"skin="cinema"accent="#e5372a"chapters="/chapters.vtt"></tomato-player>