YouTube Playback (XInput)

Xbox controller playback for YouTube with hold-to-repeat

Bu betiği kurabilmeniz için Tampermonkey, Greasemonkey ya da Violentmonkey gibi bir kullanıcı betiği eklentisini kurmanız gerekmektedir.

Bu betiği yüklemek için Tampermonkey gibi bir uzantı yüklemeniz gerekir.

Bu betiği kurabilmeniz için Tampermonkey ya da Violentmonkey gibi bir kullanıcı betiği eklentisini kurmanız gerekmektedir.

Bu betiği kurabilmeniz için Tampermonkey ya da Userscripts gibi bir kullanıcı betiği eklentisini kurmanız gerekmektedir.

Bu betiği indirebilmeniz için ayrıca Tampermonkey gibi bir eklenti kurmanız gerekmektedir.

Bu komut dosyasını yüklemek için bir kullanıcı komut dosyası yöneticisi uzantısı yüklemeniz gerekecek.

(Zaten bir kullanıcı komut dosyası yöneticim var, kurmama izin verin!)

Advertisement:

Bu stili yüklemek için Stylus gibi bir uzantı yüklemeniz gerekir.

Bu stili yüklemek için Stylus gibi bir uzantı kurmanız gerekir.

Bu stili yükleyebilmek için Stylus gibi bir uzantı yüklemeniz gerekir.

Bu stili yüklemek için bir kullanıcı stili yöneticisi uzantısı yüklemeniz gerekir.

Bu stili yüklemek için bir kullanıcı stili yöneticisi uzantısı kurmanız gerekir.

Bu stili yükleyebilmek için bir kullanıcı stili yöneticisi uzantısı yüklemeniz gerekir.

(Zateb bir user-style yöneticim var, yükleyeyim!)

Advertisement:

Yazar
kidpoleon
Günlük kurulumlar
0
Toplam kurulumlar
1
Değerlendirmeler
0 0 0
Versiyon
1.0
Oluşturulma
16.06.2026
Güncellenme
16.06.2026
Boyut
9,88 KB
Lisans
MIT
Geçerli

YouTube Playback (XInput)

Description

Advanced Xbox controller support for YouTube with hold-to-repeat functionality. Control YouTube playback using your gamepad with precise seek, volume, and navigation controls.

Features

  • Full Controller Support: Maps Xbox controller buttons to YouTube playback controls
  • Hold-to-Repeat: Hold directional buttons and triggers for continuous action
  • Focus Detection: Only responds to input when YouTube tab is active and focused
  • Volume Overlay: D-Pad volume controls show YouTube's native volume overlay
  • Frame-by-Frame: Precise frame stepping using LT/RT triggers
  • Quick Access: Toggle fullscreen, comments sidebar, and stats for nerds

Controller Mapping

Face Buttons

  • A: Play/Pause
  • B: Toggle Subtitles (Closed Captions)
  • X: Mute/Unmute
  • Y: Toggle Fullscreen

D-Pad

  • Up: Volume Up (+5%) - Shows overlay
  • Down: Volume Down (-5%) - Shows overlay
  • Left: Seek Backward 5 seconds
  • Right: Seek Forward 5 seconds

Shoulder Buttons

  • LB: Seek Backward 1 second (hold-to-repeat)
  • RB: Seek Forward 1 second (hold-to-repeat)

Triggers

  • LT: Frame Backward (auto-pauses, hold-to-repeat)
  • RT: Frame Forward (auto-pauses, hold-to-repeat)

Center Buttons

  • Select: Previous Video / Previous in Playlist (Shift+P)
  • Start: Next Video / Next in Playlist (Shift+N)

Thumbsticks

  • L3 (Left Stick Click): Toggle Picture-in-Picture
  • R3 (Right Stick Click): Toggle Comment Sidebar (fullscreen mode)

Technical Details

  • Hold-to-Repeat: 400ms initial delay, 100ms repeat rate (10 actions/second)
  • Focus Protection: Uses document.hasFocus() and visibilityState API
  • No Permissions: Runs entirely within page context
  • Performance: Uses requestAnimationFrame for efficient polling
  • Playlist Support: Works with YouTube playlists and mixes using native keyboard shortcuts

Browser Compatibility

This script has been tested and optimized for Firefox (Gecko). While it may work on other browsers, functionality on Chromium-based or WebKit-based browsers is not guaranteed.

Requirements

  • Modern browser with Gamepad API support
  • Xbox controller (XInput compatible)
  • Userscript manager (Tampermonkey, Greasemonkey, Violentmonkey, etc.)

Installation

  1. Install a userscript manager extension
  2. Click "Install this script" on GreasyFork
  3. Connect your Xbox controller
  4. Navigate to YouTube and start using

Notes

  • Controller input is ignored when YouTube is running in background tabs
  • Frame stepping automatically pauses the video
  • Comment sidebar toggle works in fullscreen mode on modern YouTube layout
  • START button navigates to next video or next in playlist
  • SELECT button navigates to previous video or previous in playlist
  • Fullscreen toggle works without requiring mouse interaction with video area
  • Picture-in-Picture toggle uses HTML5 PiP API for reliable operation

License

MIT License - Free to use, modify, and distribute

Author

kidpoleon