Skip to main content

Module video_box

Module video_box 

Source
Expand description

A video a note links to, in the note’s row: the room it plays in, and under that a bar to play it by.

Until it is played there is a play button, over the picture the note gave for it if it gave one, or one of YouTube’s if it is there, and nothing of the video has been asked for. Pressed, it plays where it is (see crate::video): the bar then has play and pause, how far in it is and of how long, a slider to go elsewhere in it, and its sound: a button that turns it off and on and says how loud it is, and beside it, while the pointer is over either, a slider that sets that. A click on the picture holds it and lets it go, as the button does. Beside the sound is how fast it plays, which opens a menu of speeds. At the end of the bar, either way, the link it came as opens in the browser.

The room is the same before, while and after: what the note says the video’s proportions are, or the usual ones, across the whole row (see box_size). What plays is fitted inside it, between bars if it is another shape, so nothing under it moves because it was played.

Structs§

Screen 🔒
What is in it, in the room a video of size pixels is given: as wide as there is room, and as tall as box_size makes that.

Constants§

PLAY_DISC 🔒
PLAY_ICON_SIZE 🔒
The play button over a video that is not playing: how large its icon is, the room around it, and how dark the disc it sits on.
PLAY_PADDING 🔒
SPEED_MENU_WIDTH 🔒
SPEED_SIZE 🔒
The room the speed a video plays at has on the bar, whichever speed it is, so that nothing beside it moves when another is chosen; and how wide the menu of speeds is.
VIDEO_BAR_HEIGHT 🔒
How tall the bar under a video is, and the room at its ends and between what is on it.
VIDEO_BAR_PADDING 🔒
VIDEO_BAR_SPACING 🔒
VIDEO_REASON_MAX_CHARS 🔒
How much of why a video can’t be played is said in its place.
VOLUME_WIDTH 🔒
How wide the slider is that sets how loud a video is.

Functions§

bar 🔒
The bar under a video: play or pause; then, of a video that was played, how far in it is, a slider to go elsewhere in it once it is known how long it is, its sound, and, with the slider, how fast it plays: a live one has no length, so neither; of one that wasn’t, the link it came as. At the end, opening that link in the browser.
bar_button 🔒
A button of the bar: an icon, what it does for whoever points at it, and what pressing it asks of the app.
centred 🔒
shown, in the middle of the room a video has.
fitted 🔒
A picture fitted into the room a video has, whole.
on_dark 🔒
shown, on a dark ground that shows on whatever picture is under it, as the play button’s does.
play_button 🔒
The play button over a video: white, on a dark disc, so that it shows on whatever picture is under it.
poster 🔒
The picture that stands for a video until it plays: the first of posters that can be had, once it is here. The next is only asked for when the one before it could not be had.
screen 🔒
What a video shows where it plays: its latest picture, or before it has one a picture that stands for it; and over that the play button while it is held, that it is on its way while it is, or why it can’t be played, which is said on its own.
sound 🔒
The sound of a video that was played: a button that turns it off and on, with a picture of how loud it is; and before it, while the pointer is over either or the slider is being dragged, a slider that sets how loud. The slider takes its room from the one beside it, so nothing else on the bar moves.
speed 🔒
How fast videos play, to press: it opens a menu of the speeds there are, under it, or over it where there is no room under. A speed that is not the usual one is set in the accent colour: it holds for the next video too.
tinted 🔒
An icon in color, size across.
video_box
The video at url, for under the note that links to it: where it plays, in the proportions of size, with the first of posters that can be had standing for it until it does, and the bar it is played by, on which label stands for its address. A click anywhere on it that is not on something of the bar plays it, or holds it.
video_height
How tall a video is in a row width wide, bar and all, when its note says it is size pixels, or doesn’t say.