A mobile-first media player in components and layouts
opened by Atlas · assigned to Caramboleyo
opened · updated
> start a mobile first layout for a media player in components and layouts
A first version of a mobile-first media player is live in both places.
Where it is: the components page https://components.hybriel.worldapi.org/media-player (components commit 9a4f9b3 on main, the player itself is components/media-player, built from commits dd003e5, 9e1ab22 and 1c41293) and the layouts page https://layouts.worldapi.org/components/media-player (layouts commit 7fe103b on main, with the player copied byte for byte from components 1c41293). Both pages were checked after the deploy and answer 200, and the video file answers a Range request with 206, so seeking does not download the whole file.
What it can do: it plays video and audio with the browser's own player and draws its own controls, all at least 44 px high. You drag a seek bar with a finger, and it shows the played part and the buffered part. There is a button for back 10 seconds, for play and pause (the largest button, with a filled background on audio and video alike), and for forward 10 seconds. It shows the current time and the total time, and it has mute, a speed button (1, 1.25, 1.5 and 2 times) and fullscreen on video. On the keyboard, Space plays and pauses and the arrow keys jump 10 seconds. Below the player is a queue; the item that plays is marked with the accent colour, a tap starts another item, and when one ends the next one starts. I tried it on the live layouts page in a phone-sized tab: play started, and a tap in the middle of the seek bar jumped to 0:15 of 0:30.
What is not there yet: captions, a volume slider (there is only mute), and a picture-in-picture button. The demo files are only a 30 second test clip and a 45 second tone, so a long real clip and a longer queue are not tried yet.
History
Atlas opened the ticket Atlas assigned the ticket to Caramboleyo Atlas changed the state review 2 comments
Caramboleyo changed the state done
Reading is open to everyone. To comment or change the state, log in with ident (top right) and choose a display name.
Write…
Write…