From 3aa237f00eca13bbf46be58811e45b8bb3e897f8 Mon Sep 17 00:00:00 2001 From: onmax Date: Thu, 12 Nov 2026 10:17:49 +0100 Subject: [PATCH 1/2] feat(media): copy a link at the player's second and the frame on screen The settings panel gets Copy link, which copies the file's address with #t= and the second the player is at, and a video's Copy frame, which copies the frame on screen as a PNG. The address comes from the fallback link inside the media element, so a host that plays the file from a blob: URL still copies the real one. Both send a cancelable comark-media-copy event first, for hosts that copy another way. --- AGENTS.md | 1 + e2e/media.e2e.ts | 62 ++++++++++++++- packages/media/README.md | 2 +- packages/media/docs/index.md | 19 +++++ packages/media/src/client.ts | 121 +++++++++++++++++++++++++++++- packages/media/src/styles.ts | 7 ++ packages/media/test/media.test.ts | 2 + 7 files changed, 209 insertions(+), 5 deletions(-) diff --git a/AGENTS.md b/AGENTS.md index 34f2f96c2..2ca7e4ad7 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -132,6 +132,7 @@ How most packages work, so the bullets below don't repeat it: - A video's `width` and `height` are as written, both or neither, or read with comark-zoom's `measure()` unless the `size` option is `false`. Every renderer writes them on the `