Jellyfin Projects | Kodi Projects
Overview of all my Jellyfin Web VideoOSD projects: Jellyfin-VideoOSD-Projects-Overview
Note: This script is compatible with the Jellyfin-VideoOSD-CustomOnOff-Menu.
Tested on Windows 11 on Chrome:
Adds an A-B loop button directly to the VideoOSD in Jellyfin Web. Mark two points on the timeline and the video loops endlessly between them — just like VLC's own A-B repeat. No menu diving. No playback interruption. Just click, click, and it loops.
- Injects an A-B loop button into the VideoOSD interface, right after the native playback controls
- First click sets point A at the current position
- Second click sets point B and the loop starts immediately
- Third click clears the loop and resets to the start
- Letters light up in Jellyfin's own accent color as each point is set
- Automatically resets when switching to a different video
The script:
- Reads the current playback position from the
<video>element to set point A and point B - Attaches a
timeupdatelistener that jumps back to point A once playback reaches point B - Uses a
MutationObserverto:- Detect the VideoOSD transport bar
- Insert the button right after the native playback controls
- Keep the button pinned in position, even if other custom OSD buttons load afterwards
Normally, repeating a short section of a video means manually seeking back and forth every time it ends.
This script:
- Loops a section endlessly without touching the seek bar again
- Keeps the loop controls directly inside the player UI
- Works alongside other custom OSD buttons like Speed or FrameByFrame without crowding the layout
It's especially useful for rewatching a scene, practicing along to a clip, or studying a short segment repeatedly.
- Install the JavaScript Injector plugin in Jellyfin (if not already installed).
- Open Jellyfin Admin Dashboard.
- Go to: Dashboard → Plugins → JavaScript Injector
- Paste the entire script content into the injector.
- Save.
- Refresh the Jellyfin web interface.
The A-B loop button will now appear in the VideoOSD.
All behavior is controlled via the CONFIG object at the top of the script:
spacingMode—'seamless'(no other custom OSD buttons installed) or'balanced'(used together with Speed / FrameByFrame or other injected custom buttons)symmetricExtraGapEm— target gap in em applied to both sides when usingbalancedmodehideOnNarrowWindow— mimics Jellyfin's own vanilla window-width behavior, auto-hides this button below 50em window width
- Designed for Jellyfin Web (Windows 11, Chrome)
- Only tested on 10.10.7 Web version (Icon injection may vary)
- Works with dynamic page navigation
- Desktop web browsers only — mobile, TV, and native app wrappers are intentionally excluded
MIT License
