{"id":22345544,"url":"https://github.com/gerhynes/video-speed-controller","last_synced_at":"2025-03-26T10:14:28.514Z","repository":{"id":106048151,"uuid":"109746595","full_name":"gerhynes/video-speed-controller","owner":"gerhynes","description":"A video speed controller. Built for Wes Bos' JavaScript 30 course. ","archived":false,"fork":false,"pushed_at":"2018-03-19T15:09:47.000Z","size":3,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"master","last_synced_at":"2025-01-31T11:34:27.520Z","etag":null,"topics":["javascript","javascript30","video-player"],"latest_commit_sha":null,"homepage":"https://gk-hynes.github.io/video-speed-controller/","language":"CSS","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/gerhynes.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2017-11-06T20:33:53.000Z","updated_at":"2018-03-19T15:09:48.000Z","dependencies_parsed_at":null,"dependency_job_id":"914298d9-66b1-4e12-949d-c5fce4d0744f","html_url":"https://github.com/gerhynes/video-speed-controller","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gerhynes%2Fvideo-speed-controller","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gerhynes%2Fvideo-speed-controller/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gerhynes%2Fvideo-speed-controller/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gerhynes%2Fvideo-speed-controller/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/gerhynes","download_url":"https://codeload.github.com/gerhynes/video-speed-controller/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245632415,"owners_count":20647194,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["javascript","javascript30","video-player"],"created_at":"2024-12-04T09:18:03.242Z","updated_at":"2025-03-26T10:14:28.503Z","avatar_url":"https://github.com/gerhynes.png","language":"CSS","readme":"# Video Speed Controller\n\nA video speed controller. Built for Wes Bos' [JavaScript 30](https://javascript30.com/) course.\n\n[![Screenshot of Video Speed Controller](https://res.cloudinary.com/gerhynes/image/upload/v1519425012/Screenshot-2018-2-23_Video_Speed_Scrubber_vyj6vw.png)](https://gk-hynes.github.io/video-speed-controller/)\n\n## Notes\n\nThe goal is to be able to update the video playback speed by hovering over the speed controller.\n\nFirst, select the `speed` div, the `bar` div within it, and the video.\n\nAdd a mousemove event listener to `speed` and connect it to the function `handleMove`.\n\nInside `handleMove`, set `y` to `e.pageY - this.offsetTop`.\n\nGet the `percent` by setting it to `y / this.offsetHeight`.\n\nDon't use an arrow function as you need `this` to be equal to the speedbar itself.\n\nSet `min` to 0.4 and `max` to 4, or whatever min and max speeds you want.\n\nTo have the bar respond to user input, set `height` to `Math.round(percent * 100)`, and set `bar.style.height` to `height`. Then set `playbackRate` to be `percent * (max - min) + min` and set the textContent of `bar` to be `playbackRate.toFixed(2)`. (This rounds it to two decimal places).\n\nFinally, you want to apply `playbackRate` to the video, so set `video.playbackRate` to be `playbackRate`.\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgerhynes%2Fvideo-speed-controller","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgerhynes%2Fvideo-speed-controller","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgerhynes%2Fvideo-speed-controller/lists"}