Member-only story
How to Build a Chrome Extension for Video Playback Speed Control
3 min readOct 26, 2024
This blog walks you through creating a Chrome extension that allows users to adjust the playback speed of videos on any webpage. By the end, you’ll have a fully functional Chrome extension that adjusts video speed with ease — even with third-party cookies blocked.
Step 1: Setting Up the Project
Create a new project folder, VideoSpeedAdjuster
, with the following structure:
VideoSpeedAdjuster/
├── manifest.json
├── popup.html
├── popup.js
├── background.js
├── content.js
└── icon.png
Step 2: Defining the Extension in manifest.json
The manifest.json
file provides essential information about the extension, such as name, permissions, and background service worker. Here’s the content:
{
"manifest_version": 3,
"name": "Video Speed Adjuster",
"version": "1.0",
"description": "Adjust playback speed of videos on the current page",
"action": {
"default_popup": "popup.html",
"default_icon": {
"16": "icon.png",
"48": "icon.png",
"128": "icon.png"
}
},
"permissions": ["activeTab", "scripting"],
"background": {
"service_worker": "background.js"
}
}
- Permissions: We use
activeTab
to interact with the current tab andscripting
to inject code. - Background Service Worker: This listens for messages from the popup and…