source: Klonkt/CHANGELOG.md@ d039264

main
Last change on this file since d039264 was 421046c, checked in by roboburr <roboburr@…>, 2 months ago

fix(audio): gapless MSE playback - background auto-advance survives on Android

Root cause of "next track plays 1 second, then pauses and the media
notification closes" on backgrounded mobile Chrome/PWA: every track
change did pause() + audio.src=<new blob> + load() + play(), which the
browser treats as a NEW playback session - and Chrome's background media
policy pauses new sessions started in the background. Only a CONTINUING
session may keep playing.

The player now has two engines:

  • MSE chain (Chrome/Firefox/Android): one MediaSource + one 'audio/mpeg' SourceBuffer (every track is uniform transcoder mp3). The next track's bytes are appended into the same buffer, so the whole queue is one continuous playback session; auto-advance is just the timeline flowing past a segment boundary - no pause/src/load/play at all. Track chrome, per-track time display, seek, lock-screen position state and session save/restore all work in track coordinates via a segment table. Played data is pruned (~2 tracks buffered), ID3 tags are stripped between appends, QuotaExceeded evicts and retries.
  • Blob fallback (iOS Safari - no MSE; or runtime MSE failure): the previous per-track objectURL behaviour, now fed from shared byte fetches. An audio error while the MSE chain is active permanently falls back to blobs for the session and retries the same track.

Manual actions (play/next/prev/queue click/restore) start a fresh chain -
those happen in the foreground where a new session is allowed.

Verified in-browser (desktop Chrome, two 8s test tones): auto-advance
crosses the boundary with ZERO pause/play events (old engine: one pair
per track), per-track time display correct, manual next resets the
chain, in-track seek works, queue wrap-around is gapless, no console
errors.

  • src/assets/js/audio-player.js - the two-engine pipeline (fetchTrackBytes, MSE chain: chainStart/appendSegment/ensureNextAppended/pruneBuffer/ maybeCrossBoundary/displayTimes; applyBlobBytes fallback; updateTrackChrome extraction; MediaSession positionState)
  • src/views/shell.ejs - cache-buster v31 -> v32
  • CHANGELOG(.nl/.de).md - user-facing entry under Unreleased (3 languages)

Co-Authored-By: Claude <noreply@…>

  • Property mode set to 100644
File size: 12.7 KB
Line 
1# Changelog — Klonkt
2
3All notable changes to Klonkt. Newest at the top.
4Versions follow [SemVer](https://semver.org/).
5
6## [Unreleased]
7
8### Fixed
9- **Music keeps playing in the background on Android.** When a track ended while
10 your phone was locked or the app was in the background, the next track would
11 start and stop again after a second. The player now feeds the whole queue as
12 one continuous stream, so auto-advancing to the next track no longer counts
13 as "new" playback that the browser is allowed to pause.
14
15## [1.3.0] — 2026-07-02
16
17### Added
18- **Choose a light or dark share card.** The auto-generated share image follows your site theme;
19 under Admin → SEO you can now force it light or dark.
20- **A mention is now a notification.** When someone on the fediverse mentions you in a post —
21 even one that isn't a reply to you — it shows up in your fediverse notifications with a link
22 to the original.
23- **Cover art on openly shared audio.** A track shared openly on the fediverse now carries its
24 cover art (or the post cover), so audio players that support artwork show it instead of a blank tile.
25- **Report a post to the fediverse.** From a fediverse post you can now report it to the moderators
26 of its own home server, with an optional reason — and if someone reports your site, the report
27 shows up in your fediverse notifications.
28- **Set a post's language.** Choose the language you wrote a post in — on the fediverse it enables
29 timeline language filtering and the translate button.
30- **Alt text for images.** Give your cover image a description (and inline images keep their own
31 alt text) — it federates to the fediverse and lets screen readers describe the picture.
32- **Mention people in a post.** Typing `@user@server` in a post now links to their profile and
33 notifies them on the fediverse — even if they don't follow you — just like a mention in a reply.
34- **Short videos in the feed autoplay and loop.** An animated cover or a short (≤30s) clip in the
35 News feed now plays automatically and loops muted, like a GIF; longer videos keep their controls.
36- **Vote on fediverse polls.** A poll from an account you follow now shows in the News feed with its
37 options and current results, and you can cast your vote — it federates back like any Mastodon vote.
38- **Create your own polls.** A post can now carry a poll (single or multiple choice, with a set
39 duration). It federates as a real fediverse poll, so your Mastodon followers can vote from their own
40 app; the live results show on the post and the poll closes itself when the time is up.
41
42### Changed
43- **Sharing audio openly is now one-way.** Once a track is shared openly on the fediverse the file
44 has spread, so "closing" it again would be false security — the editor now locks the choice after
45 opening and warns you before you tick it.
46
47### Fixed
48- **Remote videos show a preview frame.** A video in the News feed or a Circle tile (e.g. from
49 Loops or PeerTube) used to appear as a black box until you pressed play; it now shows a real
50 poster frame. (Longer videos keep their player controls by design — only clips under 30 seconds
51 autoplay like a GIF.)
52- **Mentions, hashtags and links inside brackets now work.** A mention like `(@user@server)`, a
53 `(#hashtag)` or a bracketed URL federated as plain text — and the mentioned person was never
54 notified. They now link (and notify) like their unbracketed forms.
55- **Plain web addresses become links on the fediverse.** A bare URL typed in a post or reply now
56 federates as a clickable link instead of plain text.
57
58## [1.2.0] — 2026-07-01
59
60### Added
61- **PeerTube videos in the feed.** A PeerTube link in a post now shows an inline player in the News
62 feed, like YouTube, Spotify and SoundCloud already did.
63- **Light share images.** Sites whose default theme is Light now get a matching light Open Graph card
64 when a page is shared, instead of always a dark one.
65- **Leave your own visits out of the stats.** As the admin you can now exclude your own IP address
66 from your site statistics, for a truer picture of real visitors.
67- **Right-click "Save" is turned off on covers, images and videos** — a light bit of friction so the
68 artwork isn't one click from being saved (it's friction, not protection).
69
70### Fixed
71- **Animated video covers now render correctly everywhere.** In the Circle and the grid they could
72 show up as a broken image or a blank tile; they now display as a proper looping video that fills the
73 square, centred. Right-clicking a cover gives the normal link menu instead of the browser's video controls.
74- **Following someone no longer gets stuck.** A follow whose first delivery fails (the other server
75 briefly unreachable) is now retried automatically with backoff, instead of staying on "pending" forever.
76- **Boosted posts show their real text** in the Circle, instead of a "RE: <link>" prefix.
77- **Hardened fediverse handling** — stricter signature checks on incoming activity, blocks now also
78 cover a boost of a blocked author, and pinned-post syncing no longer races when you save several times quickly.
79
80## [1.1.0] — 2026-06-30
81
82### Added
83- **Animated covers play smoothly everywhere.** Upload an animated WebP as a cover and Klonkt also
84 makes a muted, looping video of it. iOS Safari — where animated WebP is janky — gets the smooth
85 video, every other browser keeps the crisp WebP, and on the fediverse the cover federates as a
86 video that plays in Mastodon and its apps. Shown on the post, the grid, the feed and related posts.
87- **Media library (Admin → Media).** See every uploaded image, where each one is used, copy its URL,
88 and clean up unused files in one click — including the leftover video/poster of an animated cover.
89 Images, Audio and Playlists now share one tab bar.
90- **Share button** at the bottom of every post (native share sheet, or copy link).
91- **Replace a track's audio file** without re-creating the track.
92- **Music on the fediverse (first step).** Audio posts now carry schema.org *MusicRecording* /
93 *MusicAlbum* data, and a per-post toggle can share a hosted track as a real fediverse audio
94 attachment that plays in followers' feeds.
95
96### Changed
97- **Cleaner embeds on Mastodon.** A post with a YouTube/Spotify/SoundCloud link now lets Mastodon
98 show its player card; link-only tracks share their streaming links. The cover still shows in other
99 Klonkt feeds. (On your own site nothing changes — the player and cover render as before.)
100- **Circles stay in sync the fediverse way** — edits and missed posts catch up automatically via
101 standard ActivityPub, so a Circle no longer drifts out of date.
102- **Everything Klonkt federates is now valid AS2 / JSON-LD**, guarded by a test, so stricter servers
103 accept it.
104- The track list is sorted **newest-first**.
105
106### Fixed
107- **Animated WebP covers are no longer frozen to a single frame** (the crop editor and the thumbnailer
108 left them static).
109- **Link-only tracks** (Spotify/YouTube, no uploaded file) can be inserted into a post again.
110- **Link previews** (og:image / Twitter card) now use absolute image URLs, so they show on Signal,
111 WhatsApp and other scrapers.
112- Several **fediverse delivery fixes**: covers/links no longer turn into a black tile on Mastodon,
113 raw audio files don't clutter a post that already has a player, and dead links from a renamed
114 remote post heal themselves.
115- The **mobile feed** loads full-resolution covers; long titles wrap instead of overflowing.
116- **Self-hosting updates** are more reliable: re-running the installer keeps your channel, and the
117 updater no longer restarts or claims an update when you're already up to date.
118
119## [1.0.0] — 2026-06-30
120
121### Added
122- **Klonkt is now on the fediverse (ActivityPub).** Your site is a real fediverse
123 account: people on Mastodon — or another Klonkt — can follow you, and your posts
124 reach their feeds. You can follow accounts and read their posts in a **News** feed,
125 get **notifications**, and **like, boost and reply** to posts. Incoming activity is
126 verified, so fake replies, likes and followers are rejected.
127- **Anyone can reply, like or boost your posts from the fediverse** — visitors interact
128 from their own account (they just enter their server); no account on your site needed.
129- **Circles**: follow other Klonkt sites and show each other's public posts in your
130 Circle — decentralised, with no central platform.
131- **Sensitive (NSFW) posts** with your own content-warning text: blurred with
132 click-to-reveal across the site, and shown as a content warning on the fediverse.
133- **Block** an account or an entire domain you'd rather not hear from.
134- Search now also finds **tracks** (by title, artist and album), playable straight from
135 the results with a link to the post they appear in — and post search matches as you type.
136- **Live theme preview** in Admin → site settings: accent, theme and palette update
137 instantly, before you save.
138- Uploaded images are automatically optimised to **WebP** for faster pages.
139- A roomier **mobile writing experience**: tap to open a distraction-free fullscreen
140 editor, with the formatting toolbar staying in view above the keyboard.
141- **Long posts collapse in the News feed** with a *read more* toggle, so a long post no
142 longer fills the whole screen — tap to expand or collapse it.
143- **See everyone in a Circle**: when a Circle has more than five sites, the member count
144 opens a popup that lists them all, so a big Circle no longer hides its members.
145
146### Changed
147- **Palettes revised to 8**: the neutral **Klonkt** (gold accent) is the new default,
148 plus seven full-colour themes — Forest, Ocean, Teal, Lilac, Sunset, Candy and Amber.
149- **Your profile federates more completely**: the links on your profile, the date you
150 joined and the accounts you follow now travel along to other servers, so your profile
151 looks complete when someone views it from Mastodon or elsewhere.
152- **Cover images and avatars are sharper** — resized on the server instead of being
153 squeezed by the browser.
154
155### Removed
156- **Hub mode** — Klonkt is now **solo or Circles**; you build a collective or label
157 through **Circles** (federated, standalone sites).
158- **Native comments and Google login** — replies, likes and boosts now run entirely
159 through the fediverse.
160- **Local favourites (♥)** — replaced by the ⭐ fediverse like.
161
162### Fixed
163- **Hashtags and mentions now work in every language and script** (e.g. Japanese, Cyrillic,
164 Arabic), both on your site and when federating — not just the Latin alphabet.
165- **Switching a site to solo (federation off) works again.** Turning the fediverse off could
166 make the whole site return “page not found” instead of just disabling federation; it now
167 cleanly switches federation off while the rest of the site keeps working. (Self-hosters:
168 update to pick up the fix.)
169- The Fediverse and Notifications items now disappear from the menu when federation is off,
170 instead of lingering.
171- The mini-player jumps and scrolls to the track that's playing — also from an album or
172 playlist — and keeps it highlighted.
173- Empty album/playlist covers now fall back to the first track's cover.
174- A profile photo that broke in the header after the WebP switch now repairs itself.
175- Many **mobile post-editor** fixes: reliable scrolling, a formatting toolbar that stays
176 put, no page jumps when you tap a button, and a Save bar that sits just above the keyboard.
177- **Boosts now reach the original poster** — their server registers the boost and notifies
178 them, just like a boost from Mastodon — and a boost is retried if a server is briefly
179 unreachable instead of being sent once and forgotten.
180- **Unfollowing an account now takes effect on the other server** (it could previously fail
181 to register, leaving you still following on their side).
182
183## [1.0.0-beta.2] — 2026-06-19
184
185First release where we actively track the version (shown in the footer — click it for
186this page).
187
188### Added
189- Release tracking: the version number in the footer links to this changelog page.
190- Eight premium features (Patreon-gated): newsletter/mailing list, download-for-email,
191 release scheduling + fan-only previews, EPK/press kit, pro statistics, link-in-bio +
192 click stats, embeddable player, and show agenda + notify-me.
193- Newsletter signup field in the footer (on/off in Admin → Settings).
194- SMTP settings configurable in Admin → Settings (no more config-file edit needed), with
195 a test-mail button.
196
197### Changed
198- Tidier settings forms (stacked labels, full-width inputs).
199- EPK/press kit shows the top 10 most-listened tracks.
200- Nicer 404 page (mobile-friendly) and clearer login error messages.
201
202### Fixed
203- The site-wide audio player wasn't loading any tracks.
204- Button text became unreadable on hover.
205- Date pickers now follow the theme.
206- Back/forward navigation no longer shows a doubled header.
Note: See TracBrowser for help on using the repository browser.