Linea, a Video.js 10 skin, playing Tears of Steel

A skin for Video.js 10

LINEA

A film player machined like an instrument, that moves through a film one spoken line at a time.

The wheel above is the player's own, drawn large: one notch for every spoken line, turning as the film speaks.

Tears of Steel and its subtitles (CC) Blender Foundation, mango.blender.org, CC BY 3.0. Streamed from this site.

Anatomy

Every control, where you expect it.

The five controls every player needs sit on the console, always in view. Linea's own keys sit beside them, named for what they do.

Required by the briefLinea's ownOn the picture

On the picture

On the console

Linea paused on a frame of Tears of Steel, every control in view

The keys, left to right

Under the console

01

How to use it

What do you want to do?

Pick a question. The clip is the player itself, recorded doing exactly that; the white ring is where you press.

02

Fits any site

At home on any website, on any screen.

A live Linea inside a sample page. Change the site, the device, the skin and the accent; the player re-lays itself out for the space it is given, and every lit part takes the accent.

Site
Device
Skin
Accent

03

Every state

Every moment of playback, shown.

From the first frame to the last, on a computer and on a phone. All 22 states, in both skins, captured from the real player. Scroll the list, or pick one.

Linea before play: the standby screen
Ready to play
  1. Start and end

  2. Watching

  3. Moving by line

  4. Captions and language

  5. Sound

  6. Settings and keyboard

  7. On a phone

  8. Smoked glass

04

Design thinking

A timeline guesses. Linea knows.

A timelineDrag, overshoot, drag back.
LineaEvery jump lands on the start of a line.

05

Specifications

Built on Video.js 10.

Player
Video.js 10.3, HTML: <video-player>, <media-container> and any Video.js media element (<hls-video>, <mux-video>, a plain <video>).
Made of
HTML, CSS and TypeScript; layered renders of the body at 1x and 2x, AVIF with WebP fallback; one font family (Saira) under the Open Font License.
Captions
Read from the video's own tracks or a complete WebVTT file; HLS subtitle renditions are read from the playlist. No captions: the film is cut into 28 equal steps and every control still works.
Layouts
The layout follows the player’s own width, not the window: wide from 760 px, upright below it.
Outputs
Picture in picture; AirPlay in Safari on a Mac and any browser on iPhone and iPad; Google Cast in Chrome and Edge on computers and Android, through Google’s Cast SDK.
Site settings
--ember, --ember-hot, --ember-glow and --l-now set the accent in both skins, and --sr-accent-turn turns the rendered silver parts to it (the hue difference from #ff5a1f); --sr-font-names and --sr-font-window set the type.
Video
HLS with Auto, 1080p, 720p and 480p, served with honest peak bitrates, so Auto picks a size the connection can hold.
Skins
Two: Silver, the default, and Smoked glass, the same controls in a smoked-glass body that shows the belt-driven machine inside. Its seek track has one slot per spoken line, and a click goes to that line; the caption window counts the lines (LINE 04 / 86). Add skin="smoked" to the player to use it.
Weight
Skin code for both skins 62.6 KB gzipped, inside a 64 KB budget; 334 unit tests.

06

Accessibility

Made for every viewer, and checked.

Space K
Play or pause
← →
Previous or next line
A
Repeat the line
N
Next line
W
Step on or off
C
Captions on or off
J L
Back or forward 10 seconds
Shift + ← →
Back or forward 5 seconds
↑ ↓
Volume
M
Mute
F
Full screen
< >
Speed
Home End
Start or end of the film
0 to 9
Jump to 0 to 90 percent
Esc
Close Settings

07

Install

Add Linea to any page.

  1. Load Video.js and Linea
    <script type="module" src="https://cdn.jsdelivr.net/npm/@videojs/cdn@10.3.0/video-player.js"></script>
    <script type="module" src="https://cdn.jsdelivr.net/npm/@videojs/cdn@10.3.0/ui/container.js"></script>
    <script type="module" src="https://cdn.jsdelivr.net/npm/@videojs/cdn@10.3.0/media/hls-video.js"></script>
    <link rel="stylesheet" href="https://akintadeaduralere-cmyk.github.io/linea/skin/linea.css">
  2. Wrap your videoFor the Smoked glass skin, add skin="smoked" to the div.
    <div id="player" reel-title="My film">
      <video-player><media-container>
        <hls-video src="your-stream.m3u8" playsinline crossorigin>
          <track kind="captions" srclang="en" label="English" src="captions.vtt" default>
        </hls-video>
      </media-container></video-player>
    </div>
  3. Mount it
    <script type="module">
      import { mountSentenceReel } from 'https://akintadeaduralere-cmyk.github.io/linea/skin/linea.js';
      const host = document.getElementById('player');
      mountSentenceReel(host, host.querySelector('hls-video'));
    </script>

Open source under Apache 2.0. The code on GitHub

Linea is a self-initiated concept made for the Video.js skins challenge.