diff --git a/apps/web/src/components/video/RecordingPlayer.tsx b/apps/web/src/components/video/RecordingPlayer.tsx
index 7b03cf5..c2422c9 100644
--- a/apps/web/src/components/video/RecordingPlayer.tsx
+++ b/apps/web/src/components/video/RecordingPlayer.tsx
@@ -68,7 +68,9 @@ export function RecordingPlayer({
: null,
});
- return () => { handle.destroy(); };
+ return () => {
+ handle.destroy();
+ };
// `chapters` is intentionally not a dependency: rebuilding the whole player
// on a new array identity would lose the reader's position. Chapters that
// arrive later go through the handle's setChapters instead.
diff --git a/apps/web/src/lib/player/player.css b/apps/web/src/lib/player/player.css
index 23a26c8..530fa52 100644
--- a/apps/web/src/lib/player/player.css
+++ b/apps/web/src/lib/player/player.css
@@ -19,7 +19,14 @@
picture. Its focus ring would otherwise sit around the whole video. */
outline: none;
font-family:
- ui-sans-serif, system-ui, -apple-system, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
+ ui-sans-serif,
+ system-ui,
+ -apple-system,
+ 'Segoe UI',
+ Roboto,
+ Helvetica,
+ Arial,
+ sans-serif;
-webkit-user-select: none;
user-select: none;
}
diff --git a/apps/web/src/lib/player/player.ts b/apps/web/src/lib/player/player.ts
index 16bc746..6c4998b 100644
--- a/apps/web/src/lib/player/player.ts
+++ b/apps/web/src/lib/player/player.ts
@@ -67,8 +67,7 @@ const SKIP_SECONDS = 10;
const ICONS = {
play: '',
- pause:
- '',
+ pause: '',
replay:
'',
back10:
@@ -248,7 +247,12 @@ export function createPlayer(
});
const shareButton = iconButton('pux-player__btn', 'Copy link at this time', ICONS.link, 'share');
const pipButton = iconButton('pux-player__btn', 'Picture in picture', ICONS.pip, 'pip');
- const fullscreenButton = iconButton('pux-player__btn', 'Fullscreen', ICONS.enterFullscreen, 'fullscreen');
+ const fullscreenButton = iconButton(
+ 'pux-player__btn',
+ 'Fullscreen',
+ ICONS.enterFullscreen,
+ 'fullscreen'
+ );
row.append(
playButton,
@@ -293,7 +297,9 @@ export function createPlayer(
opts?: AddEventListenerOptions
): void {
target.addEventListener(type, handler, opts);
- cleanups.push(() => { target.removeEventListener(type, handler, opts); });
+ cleanups.push(() => {
+ target.removeEventListener(type, handler, opts);
+ });
}
function showNotice(message: string, action?: { label: string; run: () => void }): void {
@@ -559,9 +565,15 @@ export function createPlayer(
renderRate();
savePrefs({ volume: video.volume, muted: video.muted, rate: video.playbackRate }, storage);
});
- on(video, 'waiting', () => { root.classList.add('pux-player--buffering'); });
- on(video, 'playing', () => { root.classList.remove('pux-player--buffering'); });
- on(video, 'canplay', () => { root.classList.remove('pux-player--buffering'); });
+ on(video, 'waiting', () => {
+ root.classList.add('pux-player--buffering');
+ });
+ on(video, 'playing', () => {
+ root.classList.remove('pux-player--buffering');
+ });
+ on(video, 'canplay', () => {
+ root.classList.remove('pux-player--buffering');
+ });
on(video, 'error', () => {
root.classList.remove('pux-player--buffering');
root.classList.add('pux-player--failed');
@@ -570,8 +582,12 @@ export function createPlayer(
on(overlay, 'click', togglePlay);
on(playButton, 'click', togglePlay);
- on(backButton, 'click', () => { seekBy(-SKIP_SECONDS); });
- on(forwardButton, 'click', () => { seekBy(SKIP_SECONDS); });
+ on(backButton, 'click', () => {
+ seekBy(-SKIP_SECONDS);
+ });
+ on(forwardButton, 'click', () => {
+ seekBy(SKIP_SECONDS);
+ });
on(muteButton, 'click', () => {
video.muted = !video.muted;
});
@@ -579,7 +595,9 @@ export function createPlayer(
video.volume = Number(volumeInput.value);
video.muted = Number(volumeInput.value) === 0;
});
- on(rateButton, 'click', () => { cycleRate(1); });
+ on(rateButton, 'click', () => {
+ cycleRate(1);
+ });
on(shareButton, 'click', () => void copyLink());
on(pipButton, 'click', () => void togglePip());
on(fullscreenButton, 'click', () => void toggleFullscreen());
@@ -621,11 +639,15 @@ export function createPlayer(
on(scrub, 'pointerup', endScrub);
on(scrub, 'pointercancel', endScrub);
- on(root, 'pointermove', () => { showControls(); });
+ on(root, 'pointermove', () => {
+ showControls();
+ });
on(root, 'pointerleave', () => {
if (!video.paused) root.classList.remove('pux-player--controls');
});
- on(root, 'focusin', () => { showControls(); });
+ on(root, 'focusin', () => {
+ showControls();
+ });
/**
* Keys.