Greasy Fork is available in English.

Disable BBC EMP Autoplay

Forces autoplay to be turned off in embedded media players on BBC websites.

المؤلف
uxamend
التثبيت اليومي
0
إجمالي التثبيت
18
التقييمات
0 0 0
الإصدار
1.3.2
تم إنشاؤه
تم تحديثه
الترخيص
CC0-1.0
ينطبق على

وصف المؤلف

Background

Embedded video players on BBC websites (such as BBC News) normally autoplay another video by default. Although a toggle is provided to disable this autoplay, this is unsuitable where cookies are not being retained between sessions, because the toggle will revert to the default in each new session. Disabling autoplay each time is hassle.

How it works

This script simply finds the toggle switch element that disables autoplay within the page, checks its current state, and then issues a click event on the switch to disable autoplay.

Please note that this script is not for iPlayer, only the EMP.

Version history

1.2. First public release.
1.2.1. Changed @namespace to more unique value.
1.3. The BBC introduced a new EMP design requiring an update to this script. We still support the old one too, as it's still in use on some pages.
1.3.1 Bug fix: For the "new" style EMP, we have to wait until the video is playing before we can press the toggle to turn off autoplay.
1.3.2 Previous bug fix in 1.3.1 was not sufficient. Not only do we have to wait for the video to play, but we must also then check that autoplay remains disabled for some time, because it has a bad habit of initially appearing disabled or appearing to respond to our click, but then changing its mind and becoming enabled.