WayinVideo · walkthrough
Save 99% of your time on long videos.
WayinVideo: A Chrome extension that summarises YouTube and Bilibili videos, with clickable timestamps and chat about what's on screen.
WayinVideo
Browser extension · AI video
- Video sites
- 2 video sites
- UI languages
- 90+ uI languages
- Tracked events
- 49 tracked events
- Build targets
- 3 build targets
- When
- 2024
Wayin AI · Chrome extension, Manifest V3
The UI lives inside YouTube's and Bilibili's own single-page apps, so most of the work is getting in, staying in, and passing messages between Chrome's extension contexts.
…moreShow less
Video summary
A summary and highlights in one request, editable in place.
Smart timestamps
Every highlight and sub-point seeks the player; a slider scrubs within the range.
Screenshot and ask
Crop any part of the tab and ask about it.
AI chat with history
Per-video conversations, resumable from history, with answer feedback.
Share
As a rendered image or a hosted link.
Accounts
Email code or Google sign-in, synced with the browser profile.
- #ChromeExtensions
- #Serviceworker
- #Contentscripts
- #React
- #TypeScript
- #AntDesign
- #Vite
- #html2canvas
- #i18next
- #Mixpanel
Getting into a page it doesn't own
The host page renders late and changes video without reloading, so mounting is retried, not awaited: each attempt checks for its own element id first, and on every URL change (tabs.onUpdated) the worker tells the tab to mount again. Ant Design runs under a wayin class prefix to avoid CSS clashes.
- 1DrawerOpened from the toolbar icon, over the right of the page.
- 2Inline panelIn YouTube's sidebar, or under Bilibili's uploader card.
- 3Player buttonA “Wayin AI” button in the like/share row.
When it mounts
- script load
- DOMContentLoaded
- +1 s
- +3 s
- on update-url
One message bus
The content script owns the UI and the video; the service worker owns the network, tabs and screenshots. Between them is only JSON messages.
Who is allowed to do what
A content script’s fetch runs as youtube.com and hits CORS; the worker doesn’t. The catch: sendMessage carries only JSON, so screenshots cross as base64 and become a Blob in the worker.
A timestamp is a seek
One highlight, as the API returns it
{
"start": "250000",
"end": "380000",
"desc": "A timestamp is a seek",
"events": [
{ "timestamp": "262000", "desc": "Highlights arrive in milliseconds" },
{ "timestamp": "302000", "desc": "The round trip through the worker" }
]
}What a click does
- 1PanelMath.round(ms / 1000), then sendMessage change-video-time
- 2Service workerfinds the active tab, forwards the same message to it
- 3Content scriptfinds .html5-main-video, or else the first <video>
- 4VideocurrentTime = seconds; on Bilibili the progress bar is forced visible
No player API, so one line seeks on both sites. The slider clamps with min/max, since a range can arrive reversed.
Signing in from someone else's tab
An extension has no redirect page on the API’s domain, so the worker opens Google sign-in in a popup and watches its URL.
Google sign-in, finished in a popup
url = startGoogleSignIn() in the service workerwindows.create({ url, type: 'popup' })tabs.onUpdated((tabId, change, tab) =>if isVideoSite(tab.url): lastVideoTab = tabId remembered on every loadif isSignInComplete(change.url):session = readSession(change.url)storage.sync.set({ session })tabs.sendMessage(lastVideoTab, 'login-success')windows.remove(tab.windowId))The session lives in chrome.storage.sync; when it expires, every panel returns to sign-in.
Ask about a frame
The camera button asks the worker for captureVisibleTab, opens a crop tool, and attaches the selection to the next question.
- Screenshot
- Upload image
- Chat history
- New conversation
The image uploads first, then text and image go as one turn. Enter is ignored between compositionstart and compositionend, where a Chinese IME uses it to confirm characters.