Skip to content

Commit

Permalink
fix: minimal example (#869)
Browse files Browse the repository at this point in the history
  • Loading branch information
luwes committed Mar 29, 2024
1 parent d76c66b commit d32916c
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 7 deletions.
2 changes: 1 addition & 1 deletion docs/src/pages/docs/en/examples/[...example].astro
Original file line number Diff line number Diff line change
Expand Up @@ -266,7 +266,7 @@ if (examplesDivIndex !== -1) {
const dependencies = {};
for (const url of externalModules) {
const matches = url.match(/\/npm\/(@?[^/]*?\/?[^@]+)@?([^/]*?)\//)
const matches = url.match(/\/npm\/(@?[^/]*?\/?[^@]+)@?([^/]*?)(\/|$)/)
const [, name, version] = matches ?? []
if (name) dependencies[name] = version ?? 'latest'
}
Expand Down
7 changes: 3 additions & 4 deletions examples/vanilla/themes/demuxed-2022-theme.html
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<script type="module" src="../../../dist/index.js"></script>
<script type="module" src="../../../src/js/themes/demuxed-2022.js"></script>
<script defer src="https://www.gstatic.com/cv/js/sender/v1/cast_sender.js?loadCastFramework=1"></script>
<script type="module" src="https://cdn.jsdelivr.net/npm/castable-video@0"></script>
<script type="module" src="https://cdn.jsdelivr.net/npm/castable-video@1/+esm"></script>
<link rel="stylesheet" href="https://use.typekit.net/dbt1sbf.css">

<style>
Expand All @@ -32,8 +32,7 @@ <h1>Media Chrome Demuxed 2022 Theme</h1>

<media-theme-demuxed-2022 mediastreamtype="on-demand">
<!-- <media-theme-demuxed-2022 mediastreamtype="live"> -->
<video
is="castable-video"
<castable-video
slot="media"
src="https://stream.mux.com/O6LdRc0112FEJXH00bGsN9Q31yu5EIVHTgjTKRkKtEq1k/high.mp4"
poster="https://image.mux.com/O6LdRc0112FEJXH00bGsN9Q31yu5EIVHTgjTKRkKtEq1k/thumbnail.jpg?time=23"
Expand All @@ -46,7 +45,7 @@ <h1>Media Chrome Demuxed 2022 Theme</h1>
kind="metadata"
src="https://image.mux.com/O6LdRc0112FEJXH00bGsN9Q31yu5EIVHTgjTKRkKtEq1k/storyboard.vtt"
/>
</video>
</castable-video>
</media-theme-demuxed-2022>

<div class="examples">
Expand Down
4 changes: 2 additions & 2 deletions examples/vanilla/themes/minimal-theme.html
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@
<main>
<h1>Media Chrome - Minimal Theme</h1>

<media-theme-minimal id="theme1">
<media-theme-minimal>
<video
slot="media"
src="https://stream.mux.com/O6LdRc0112FEJXH00bGsN9Q31yu5EIVHTgjTKRkKtEq1k/high.mp4"
Expand All @@ -73,7 +73,7 @@ <h1>Media Chrome - Minimal Theme</h1>

<br><br>

<media-theme-minimal id="theme2">
<media-theme-minimal>
<mux-video
playback-id="v69RSHhFelSm4701snP22dYz2jICy4E4FUyk02rW4gxRM"
metadata-video-title="Big Buck Bunny"
Expand Down

0 comments on commit d32916c

Please sign in to comment.