Skip to content

Fix: Preventing forward scrubbing (fixes: #319)#320

Merged
joe-replin merged 6 commits intomasterfrom
issue/319
Apr 2, 2025
Merged

Fix: Preventing forward scrubbing (fixes: #319)#320
joe-replin merged 6 commits intomasterfrom
issue/319

Conversation

@joe-replin
Copy link
Contributor

It seems that learners are bypassing the _preventForwardScrubbing setting by interacting with the locked media player scrub bar. Despite the setting being enabled, a small number of learners repeatedly select the scrub bar and are able to skip forward in the video, essentially bypassing the need to watch the content in full.

The issue likely stems from the current solution, which forces the scrub bar to the furthest point of progress, but this approach isn't fully effective. A more robust solution would be to ensure that the locked scrub bar is not interactable or selectable at all.

Fix

  • Fixes Fully preventing forward scrubbing #319
  • No pointer events prevents mouse and touch events.
  • Prevent default blocks the scrub bar from being changed programmatically.
  • aria-disabled makes the scrub bar non-focusable.

I'm only taking a good stab at this being a good solution to truly lock down forward scrubbing. As stated in #319, I'm not sure how the current locks are being bypassed.

Testing

Try to break it!

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👀

Copy link
Member

@oliverfoster oliverfoster left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would you not want to use all methods, just for peace of mind? And seeing as the code is there still.

@joe-replin
Copy link
Contributor Author

Added back in!

adjusting & commenting into new function for readability
@joe-replin
Copy link
Contributor Author

@swashbuck, please see latest changes for readability and review.

@joe-replin joe-replin requested a review from swashbuck April 1, 2025 18:12
clearer comment
Thank you!

Co-authored-by: Oliver Foster <[email protected]>
Sure thing!

Co-authored-by: Brad Simpson <[email protected]>
Copy link
Contributor

@swashbuck swashbuck left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

@joe-replin joe-replin merged commit 7c021c9 into master Apr 2, 2025
@github-project-automation github-project-automation bot moved this from Needs Reviewing to Recently Released in adapt_framework: The TODO Board Apr 2, 2025
github-actions bot pushed a commit that referenced this pull request Apr 2, 2025
## [6.8.2](v6.8.1...v6.8.2) (2025-04-02)

### Fix

* Preventing forward scrubbing (fixes: #319) (#320) ([7c021c9](7c021c9)), closes [#319](#319) [#320](#320)
@github-actions
Copy link

github-actions bot commented Apr 2, 2025

🎉 This PR is included in version 6.8.2 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

joe-allen-89 pushed a commit that referenced this pull request Jul 28, 2025
* Remove memory leak in Internet Explorer workaround, remove mep.less

* Removed 'killContextMenuTimer override to remove global delete' since it no longer exists

* Update base mediaelement JS and Less files

* Remove Flash player

* Temporarily remove overrides, add SVG asset and legacy Less (TBD if we'll need it)

* Update pluginType to rendererName, comment out event listeners for testing purposes

* Config: use legacy prefix, set icon asset location

* Added fix from mediaelement/mediaelement#2969

* Add readme to libraries

* Readme update

* Switch to new namespace mejs__

* Fix container height

* Remove .me-plugin references

* Update Less, remove bug fix for CC button language selector still appearing when toggleCaptionsButtonWhenOnlyOne: true

* Update onPlayerReady/success callback with correct new params, change startLanguage to autoplayCaptionLanguage, move startVolume, partially fix mediaCaptionsChange

* Add documentation around onPlayerReady / success callback

* Documentation update

* Replace method calls to incorrect object

* Fix remove

* Fix setupPlayPauseToggle() and related methods

* Remove mediaelementplayer-legacy.less and will re-add if needed

* Remove unused assets and styles

* Remove jumpforward/skipback assets/styles

* Remove Vimeo scripts and styles

* Fullscreen sizing fix

* Fix onCaptionsChanged

* Minor edits/comments

* Remove buildfullscreen override, update pluginType to rendererName

* Add loadPlugins, speed plugin

* Add jumpforward and skipback features, update loadPlugins() to display error messages

* Fix plugin icons, add readme

* Remove commented code

* Button icon fixes

* Fix poster size when iPhoneUseNativeControls: true

* Fix for #239

* Fix for firefox fullscreen api

* #250 Allow use of aria-pressed on closed captions button

* Remove fullscreen fix for Chrome version <17. Apply PR: mediaelement/mediaelement#2971

* Comments

* Fix missing bracket

* Force the default language so that the aria-label can be localised from Adapt

* Use dynamic import for mejs plugins, remove loadPlugins()

* Remove promise from plugin import

* Remove bug Fix for touch devices to override standard hover event

* Remove Bug fix for missing control icons on iOS touch devices

* Remove side padding on time elements

* Remove bug fix due to fixed pixel size preventing iOS from changing orientation without scaling

* Update mediaelement-fullscreen-hook.js to ES6 syntax

* Update hasTouch to use device.touch instead of relying on mejs

* Move addMejsButtonClass()

* Comment out setupPlayPauseToggle() functionality as it seems to just break playing on touch devices and may no longer be needed

* Rework plugin loading

* Move setting up model options to setupModelOptions()

* Move fullscreen hook to main overrides file

* fix client side library loading

* Reversion

* Disable keyboard actions

* Enable keyboard but still remove default keyActions

* Remove unused code

* Remove libraries/mediaelement-and-player from wait queue

* Update readme and example.json

* Remove unnecessary vendor prefixes from fullscreen hook

* Update readme with notes on vimeo/youtube

* Fix: Default seek, event.target, import await, forward scrubbing, fullscreen inview (#311)

* Move plugin Less files into main less directory to prevent issues when using build includes[]

* Restore executable permissions for adapt-contrib-media.js

* Restore executable permissions for README.md

* Update package description to remove Flash reference

* Remove transcript.pdf

* Rework plugin overrides, add plugin section to readme

* Add source ref for mediaelement-and-player.js

* Update mejs__container background to transparent

* Rework sources check

* YouTube/Vimeo check (WIP)

* Update MediaElement.js from 7.0.5 to 7.0.7, readme updates for markdownlint

* Check for YouTube or Vimeo URLs

* Add default landscape width and height to template, do not set width and height when using iPhoneUseNativeControls

* Remove part of PR #320 to fix backwards scrubbing bug

* Readme: link to specific tagged version of mediaelement-and-player.js

* Add shouldSetSize to determine if width / height should be set as a <video> attribute

* Remove unnecessary parentheses

* Fix Skip to transcript button visibility

* Bump FW version to 5.46.10 for .visually-hidden-focusable usage

* Fix FW version

---------

Co-authored-by: Oliver Foster <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Fully preventing forward scrubbing

4 participants

Comments