Vikindor / Rutube - Block Autoplay

Published:

Version: 1.0+1509924 updated

Summary: Blocks video autoplay on Rutube and in embed players by freezing the player's autoplay behavior

Homepage: https://github.com/Vikindor/rutube-block-autoplay

Support: https://github.com/Vikindor/rutube-block-autoplay/issues

License: MIT

Antifeature: unspecified

Rutube - Block Autoplay

EN: Userscript for browsers that prevents videos on Rutube from starting automatically. Works both on regular video pages and embedded players.
RU: Скрипт блокирует автозапуск видео на сайте Rutube и во встроенных плеерах через заморозку автозапуска плеера.

✨ Features

  • Stops autoplay on Rutube video pages.
  • Stops autoplay in embedded Rutube players.
  • Overrides the native video.play() method to block the first automatic play attempt.

⚙ How it works

  • The script waits until a <video> element appears.
  • It forces autoplay to false and removes the autoplay attribute.
  • On the first call to video.play(), it rejects the promise to prevent autoplay. Any further manual play calls will work normally.

Rating: 0