Skip to content

Cifer-Y/youtube-loop

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

YouTube Loop

A minimal Chrome extension that loops a specified time range on YouTube and lets you slow down playback for shadowing / language practice.

Sibling project of netflix-loop — same UX, simpler internals (no DRM bridge needed).

Features

  • Floating panel on any YouTube watch page (top-right, dim until hovered)
  • Set a start/end time, click Loop — the player jumps back to start whenever it reaches end
  • button next to each input grabs the current playback time (no typing)
  • Time inputs accept any of: 1:23, 1:23:45, or raw seconds (83)
  • Playback speed: 5 presets (0.5 / 0.75 / 1× / 1.25 / 1.5) plus a fine-adjust row — click /+ for ±0.05 steps, or type a custom value in the input (range 0.252.00, e.g. 0.85). Pitch preserved.
  • Loop range and speed are remembered per video (keyed by ?v= ID)
  • Manually dragging the timeline outside the loop range turns the loop off (so you can scrub freely)
  • Ad-aware: skips loop logic and mark buttons during ads (checks #movie_player.ad-showing); shows Ad playing… in the readout
  • Survives video changes (re-binds via MutationObserver)
  • Works in fullscreen (panel re-parents into the fullscreen element)

Install (load unpacked)

  1. Open chrome://extensions
  2. Enable Developer mode (top right)
  3. Click Load unpacked and select this folder
  4. Open any YouTube video — the panel appears in the top-right corner

To update after editing source: hit the refresh icon on the extension card in chrome://extensions, then reload the YouTube tab.

Usage

  1. Play your video, scrub to the moment you want to loop from
  2. Click next to Start to mark the current time
  3. Scrub to the end of the segment, click next to End
  4. Click Loop OFF to toggle it on
  5. Pick a speed preset (e.g. 0.75) for slow shadowing
  6. Click to jump back to the start manually any time

Drag the timeline outside the marked range to disable the loop and watch normally.

Files

File What it does
manifest.json Manifest V3; injects on all youtube.com pages
content.js Builds the panel, handles loop logic, ad detection, persistence
content.css Panel styling (dark with YouTube red accent)

Notes

  • Why simpler than Netflix Loop? YouTube doesn't gate <video>.currentTime writes behind DRM, so we can seek directly without bridging into a MAIN-world script.
  • Loop boundary precision is ~±0.25s (timeupdate ~4Hz). Plenty for normal use.
  • Only /watch?v=... URLs are supported. Shorts and embeds are out of scope.
  • Permissions: storage and host_permissions for youtube.com. No analytics, no network calls.

About

Chrome extension to loop a specified time range on YouTube. Sibling project of netflix-loop. Useful for language shadowing, music, dance practice.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors