forked from muxinc/elements
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
requires muxinc/media-chrome#1024
- Loading branch information
Showing
15 changed files
with
159 additions
and
354 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,63 @@ | ||
<!DOCTYPE html> | ||
<html> | ||
<head> | ||
<meta name="viewport" content="width=device-width" /> | ||
<title><mux-player> example</title> | ||
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/water.css@2/out/water.css"> | ||
<link rel="stylesheet" href="./styles.css"> | ||
<script type="module" src="./dist/mux-player.js"></script> | ||
<style> | ||
mux-player { | ||
display: block; | ||
width: 100%; | ||
margin: 1rem 0 2rem; | ||
background-color: #000; | ||
} | ||
|
||
mux-player:not([audio]) { | ||
aspect-ratio: 16 / 9; | ||
} | ||
</style> | ||
</head> | ||
<body> | ||
<header> | ||
<div class="left-header"> | ||
<a class="mux-logo" href="https://www.mux.com/player" target="_blank"> | ||
<picture> | ||
<source media="(prefers-color-scheme: dark)" srcset="https://user-images.githubusercontent.com/360826/233653989-11cd8603-c20f-4008-8bf7-dc15b743c52b.svg"> | ||
<source media="(prefers-color-scheme: light)" srcset="https://user-images.githubusercontent.com/360826/233653583-50dda726-cbe7-4182-a113-059a91ae83e6.svg"> | ||
<img alt="Mux Logo" src="https://user-images.githubusercontent.com/360826/233653583-50dda726-cbe7-4182-a113-059a91ae83e6.svg"> | ||
</picture> | ||
</a> | ||
<h1><a href="/">Elements</a></h1> | ||
</div> | ||
<div class="right-header"> | ||
<a class="github-logo" href="https://github.com/muxinc/elements" target="_blank"> | ||
<img width="32" height="32" src="./images/github-logo.svg" alt="Github logo"> | ||
</a> | ||
</div> | ||
</header> | ||
|
||
<!-- Correct playbackid: Sc89iWAyNkhJ3P1rQ02nrEdCFTnfT01CZ2KmaEcxXfB008 --> | ||
<mux-player | ||
stream-type="on-demand" | ||
playback-id="Sc89iWAyNkhJ3P1rQ02nrEdCFTnfT01CZ2KmaEcxXfB00" | ||
></mux-player> | ||
|
||
<button id="load-video-btn">Load new playback id</button> | ||
<br> | ||
<br> | ||
|
||
<!-- Load new playback id --> | ||
<script> | ||
const player = document.querySelector('mux-player'); | ||
const loadVideoBtn = document.getElementById('load-video-btn'); | ||
|
||
loadVideoBtn.addEventListener('click', () => { | ||
player.playbackId = 'Sc89iWAyNkhJ3P1rQ02nrEdCFTnfT01CZ2KmaEcxXfB008'; | ||
}); | ||
</script> | ||
|
||
<a href="../">Browse Elements</a> | ||
</body> | ||
</html> |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.