-
Notifications
You must be signed in to change notification settings - Fork 70
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: add checkmark icon to listboxes
- Loading branch information
Showing
16 changed files
with
444 additions
and
297 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
56 changes: 56 additions & 0 deletions
56
examples/vanilla/control-elements/media-playback-rate-listbox.html
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,56 @@ | ||
<!DOCTYPE html> | ||
<html lang="en"> | ||
<head> | ||
<meta name="viewport" content="width=device-width"> | ||
<title>Media Chrome Playback Rate Listbox</title> | ||
<script type="module" src="../../../dist/index.js"></script> | ||
<script type="module" src="../../../../dist/experimental/media-playback-rate-listbox.js"></script> | ||
<style> | ||
/** add styles to prevent CLS (Cumulative Layout Shift) */ | ||
media-controller:not([audio]) { | ||
display: block; /* expands the container if preload=none */ | ||
max-width: 540px; /* allows the container to shrink if small */ | ||
aspect-ratio: 16 / 9; /* set container aspect ratio if preload=none */ | ||
} | ||
|
||
video { | ||
width: 100%; /* prevents video to expand beyond its container */ | ||
} | ||
|
||
.examples { | ||
margin-top: 20px; | ||
} | ||
</style> | ||
</head> | ||
<body> | ||
<h1>Playback Rate Listbox</h1> | ||
|
||
<media-controller id="mc"> | ||
<video | ||
id="video" | ||
slot="media" | ||
src="https://stream.mux.com/O6LdRc0112FEJXH00bGsN9Q31yu5EIVHTgjTKRkKtEq1k/high.mp4" | ||
poster="https://image.mux.com/O6LdRc0112FEJXH00bGsN9Q31yu5EIVHTgjTKRkKtEq1k/thumbnail.webp" | ||
preload="metadata" | ||
muted | ||
crossorigin | ||
></video> | ||
<media-control-bar> | ||
<media-play-button></media-play-button> | ||
<media-time-display showduration></media-time-display> | ||
<media-time-range></media-time-range> | ||
<media-mute-button></media-mute-button> | ||
<media-pip-button></media-pip-button> | ||
<media-fullscreen-button></media-fullscreen-button> | ||
</media-control-bar> | ||
</media-controller> | ||
<br> | ||
|
||
<media-playback-rate-listbox mediacontroller="mc"></media-playback-rate-listbox> | ||
|
||
|
||
<div class="examples"> | ||
<a href="../">View more examples</a> | ||
</div> | ||
</body> | ||
</html> |
53 changes: 53 additions & 0 deletions
53
examples/vanilla/control-elements/media-playback-rate-selectmenu.html
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,53 @@ | ||
<!DOCTYPE html> | ||
<html lang="en"> | ||
<head> | ||
<meta name="viewport" content="width=device-width"> | ||
<title>Media Chrome Playback Rate Selectmenu</title> | ||
<script type="module" src="../../../dist/index.js"></script> | ||
<script type="module" src="../../../../dist/experimental/media-playback-rate-selectmenu.js"></script> | ||
<style> | ||
/** add styles to prevent CLS (Cumulative Layout Shift) */ | ||
media-controller:not([audio]) { | ||
display: block; /* expands the container if preload=none */ | ||
max-width: 540px; /* allows the container to shrink if small */ | ||
aspect-ratio: 16 / 9; /* set container aspect ratio if preload=none */ | ||
} | ||
|
||
video { | ||
width: 100%; /* prevents video to expand beyond its container */ | ||
} | ||
|
||
.examples { | ||
margin-top: 20px; | ||
} | ||
</style> | ||
</head> | ||
<body> | ||
<h1>Playback Rate Selectmenu</h1> | ||
|
||
<media-controller id="mc"> | ||
<video | ||
id="video" | ||
slot="media" | ||
src="https://stream.mux.com/O6LdRc0112FEJXH00bGsN9Q31yu5EIVHTgjTKRkKtEq1k/high.mp4" | ||
poster="https://image.mux.com/O6LdRc0112FEJXH00bGsN9Q31yu5EIVHTgjTKRkKtEq1k/thumbnail.webp" | ||
preload="metadata" | ||
muted | ||
crossorigin | ||
></video> | ||
<media-control-bar> | ||
<media-play-button></media-play-button> | ||
<media-time-display showduration></media-time-display> | ||
<media-time-range></media-time-range> | ||
<media-mute-button></media-mute-button> | ||
<media-playback-rate-selectmenu></media-playback-rate-selectmenu> | ||
<media-pip-button></media-pip-button> | ||
<media-fullscreen-button></media-fullscreen-button> | ||
</media-control-bar> | ||
</media-controller> | ||
|
||
<div class="examples"> | ||
<a href="../">View more examples</a> | ||
</div> | ||
</body> | ||
</html> |
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
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,9 @@ | ||
export { MediaChromeListbox } from './media-chrome-listbox.js'; | ||
export { MediaChromeOption } from './media-chrome-option.js'; | ||
export { MediaChromeSelectMenu } from './media-chrome-selectmenu.js'; | ||
export { MediaCaptionsListbox } from './media-captions-listbox.js'; | ||
export { MediaCaptionsSelectMenu } from './media-captions-selectmenu.js'; | ||
export { MediaPlaybackRateListbox } from './media-playback-rate-listbox.js'; | ||
export { MediaPlaybackRateSelectMenu } from './media-playback-rate-selectmenu.js'; | ||
export { MediaRenditionListbox } from './media-rendition-listbox.js'; | ||
export { MediaRenditionSelectMenu } from './media-rendition-selectmenu.js'; |
Oops, something went wrong.