layouts
All repositories: gitoria
1.8 KB
// components/showcase/media-player.hl — `/components/media-player`: the media player, themed: no frames, the seek bar a// thin bar with the accent as the played part, the current queue item the accent on a surface. The demo's media files// (lib/media.hl, components/showcase/media) are the same public-domain test clips the components site plays.parent '../main.hl'import SiteHeader from '../site-header.hl'import SiteSidebar from '../site-sidebar.hl'import ContentFirst from '../../theme/shell/content-first.hl'import TheMediaPlayer from '../media-player/media-player.hl'__title = 'Media player · WorldAPI layouts'Hybrid items = [{ src = '/media/test-video.mp4' title = 'Test clip (video)' dur = '0:30' }{ src = '/media/test-audio.mp3' title = 'Test tone (audio)' dur = '0:45' }]String current = '/media/test-video.mp4'String currentKind = 'video'String currentTitle = 'Test clip (video)'String currentArtist = 'made with ffmpeg (public domain)'String autoPlay = 'false'picked = (src) => {current = srcautoPlay = 'true'let i = 0while (i < items.length) {if (items[i].src == src) { currentTitle = items[i].title }i = i + 1}currentKind = src.endsWith('.mp3') ? 'audio' : 'video'}View {showMediaPlayer {SiteHeader { current = "/components/media-player" }ContentFirst {SiteSidebar { current = "/components/media-player" }main {h1 { "Media player" }p { class = "muted" "Audio and video, phone first: a seek bar you drag with a finger, back / forward 10 seconds, mute, the speed, fullscreen on video, and a queue under the player." }TheMediaPlayer { src = current kind = currentKind title = currentTitle artist = currentArtist cover = "/media/cover.png" queue = items onPlay = picked autoPlay = autoPlay }p { class = "readme links" a { href = "/read/readme-media-player" "README of the component (how an app uses it)" } }}}}}
Branches
Latest commits
- e631791buser-menu: nest child and compound selectors in Stylemre
- 69604944three-pane: nest child and compound selectors in Stylemre
- 3e389b83main-menu: nest child and compound selectors in Stylemre
- 05413975list-first: nest child and compound selectors in Stylemre
- c545b642content-first: nest child and compound selectors in Stylemre
- eae2be7aapp-sidebar: nest child selectors and document caller-slot gapmre
- 69c9f784Record LY7 slot nesting blocker and minimal repromre
- b1d4f379app-header: nest child and compound selectors in Stylemre
- 6385ff8eRecord LY7 style formatting proof and review statusmre
- 0100f51etracker-demo: format Style with nested rules and bare mediamre
- 5f82554enotes-demo: format Style with nested rules and bare mediamre
- 3dc27d78mail-demo: format Style with nested rules and bare mediamre
- cf9648afhome: format Style with nested rules and bare mediamre
- 846a6242user-menu: format Style with nested rules and bare mediamre
- 4d58708cthree-pane: format Style with nested rules and bare mediamre
- 0bbfc553main-menu: format Style with nested rules and bare mediamre
- 7755199dlist-first: format Style with nested rules and bare mediamre
- 35199303content-first: format Style with nested rules and bare mediamre
- 00f6e698app-sidebar: format Style with nested rules and bare mediamre
- bb2f29c9app-header: format Style with nested rules and bare mediamre