README.md (2164 bytes)
1 # SubRead for YouTube (Chrome and Firefox) 2 3 Shows your own `.srt` over a YouTube video, in time with it. It is made for 4 audiobooks on YouTube: make book-accurate subtitles at 5 [subread.space](https://subread.space) from the audiobook and its ebook (free, 6 in the browser), then read along on the video. 7 8 Press **SR** at the top right of the player, and choose the `.srt`. 9 10  11 12 The picture is from the stand-in page in `tests/mock/` (`/watch?v=mock&demo`), not from YouTube. 13 14 - **Start**: the video on YouTube often has an intro that your audio file does 15 not. Play to where the narrator reads the first line and press 16 **First line is now**, or move the start by 0.1 s and 1 s. 17 - **Speed**: for an upload that runs a little faster or slower than your file. 18 - The subtitles and these settings are kept for each video (the newest 8). 19 20 ## What it does not do 21 22 It does not read, record or download the video or its sound, and it sends 23 nothing anywhere. The one permission is `storage`, to keep your subtitles in 24 the browser. The stores do not allow an extension that takes media from 25 YouTube, and YouTube's terms do not allow it; this one only draws text. 26 27 ## Layout 28 29 | Path | What | 30 |---|---| 31 | `manifest.json` | Manifest V3, the same for both browsers (`browser_specific_settings` is for Firefox) | 32 | `src/srt.js` | Reads .srt and .vtt; finds the cue for a moment. No browser APIs, so Node tests it | 33 | `src/content.js`, `src/content.css` | The caption box, the **SR** button and the panel, inside `#movie_player` | 34 | `popup.html` | How to use it | 35 | `tests/srt.test.cjs` | `node --test tests/srt.test.cjs` | 36 | `tests/mock/server.py` | A stand-in for a watch page, to try the content script by hand | 37 | `tools/pack.py` | Makes `dist/subread-chrome.zip` and `dist/subread-firefox.zip` | 38 | `store/listing.md` | The texts and answers for the two stores | 39 40 ## Try it 41 42 Chrome: `chrome://extensions` > Developer mode > Load unpacked > this folder. 43 Firefox: `about:debugging` > This Firefox > Load Temporary Add-on > `manifest.json`. 44 45 ## Licence 46 47 AGPL-3.0: see `LICENSE`.