Skip to content

Breaking: Upgrade MediaElement.js to 7.0.7 (fixes #298 #297 #232)#299

Merged
joe-allen-89 merged 90 commits intomasterfrom
issue/298
Jul 28, 2025
Merged

Breaking: Upgrade MediaElement.js to 7.0.7 (fixes #298 #297 #232)#299
joe-allen-89 merged 90 commits intomasterfrom
issue/298

Conversation

@swashbuck
Copy link
Contributor

@swashbuck swashbuck commented Aug 14, 2024

Fix #298 #297 #232

Dependencies

Breaking

  • Upgrades MediaElement.js from v2.21.2 to v7.0.7. This includes breaking namespace changes.
  • Removes Flash support
  • Removes IE 9/10 support
  • Removes Vimeo support (Vimeo-specific styles and JS shims). Anyone who needs Vimeo support should migrate to the Adapt Vimeo plugin.
  • Removes YouTube support. Anyone who needs YouTube support should migrate to the Adapt YouTube plugin.

Notable changes and deletions

  • First off, refer to the MediaElement migration notes, particularly regarding the namespace changes.
  • speed, jumpforward and skipback have moved to mejs plugins. Other plugins can be considered for inclusion in the future.
  • The MediaFeatures object is now just Features
  • MediaElement success callback passes different parameters: media, node, and instance. I've added documentation about this to onPlayerReady() which is the success callback function.
  • Some properties have moved. mediaElement.player changed to mediaElement.options. selectedTrack has moved to the instance object mentioned above.
  • Removed many assets. Icon implementation by default now uses SVG symbols. When using the Vanilla theme (PR listed below), these icons are replaced with Vanilla font icons.
  • Added a README.md to the libraries directory detailing the changes we've directly made to the mejs library itself. These changes have pending PRs at the mejs GitHub repo.

Fix

Configuration changes to existing courses

None

Regression testing

The following fixes could use retesting. I could not find the original GitHub tickets for some of these.

  1. "Default shortcut keys trap a screen reader user inside the player once in focus. These keys are unnecessary as one may traverse the player in a linear fashion without needing to know or use shortcut keys. Below is the removal of the default shortcut keys." The fix I've implemented is slightly different from the old fix.
  2. Removed: "The default seek interval functions are passed two different data types from mejs which they handle incorrectly. One is a duration integer the other is the player object. The default functions error on slider key press and so break accessibility." The old fix rewrites the defaultSeekForwardInterval and defaultSeekBackwardInterval functions to check the type of the input. These two functions have been slightly rewritten in the newer mejs library, so a fix may no longer be needed. I have removed the previous fix for now.
  3. Removed setupPlayPauseToggle() fix: "Overrides the default play/pause functionality to stop accidental playing on touch devices... we don't have a this.mediaElement.player ref on iOS devices." The fix seemed to actually break play/pause functionality on iOS, so I've removed it.
  4. Removed buildfullscreen() override ("Overwrite mediaelement-and-player buildfullscreen to remove global delete"). The only significant difference in the current override was to remove two delete hideTimeout lines. The new buildfullscreen() in mediaelement-and-player.js does not use this.
  5. Removed killContextMenuTimer override to "remove global delete" since it no longer exists in mejs
  6. Removed CSS fix for adapt-contrib-media: toggleCaptionsButtonWhenOnlyOne adapt_framework#1883
  7. Removed CSS fix for "touch devices to override standard hover event in mep.less L119"
  8. Removed CSS fix for "missing control icons on iOS touch devices"
  9. Removed CSS fix for "The width set by mejs is always 100% of container, set in pixels. Having a fixed pixel size prevents iOS from changing orientation without scaling."
  10. Fix for firefox fullscreen api In Firefox, it's necessary to press Esc twice to completely exit fullscreen #239 The fix for this PR was recent, so it should still be fine.

Known issues

@swashbuck swashbuck self-assigned this Aug 14, 2024
@swashbuck swashbuck changed the title Breaking: Upgrade MediaElement.js (fixes #298) Update: Upgrade MediaElement.js (fixes #298) Aug 15, 2024
@swashbuck swashbuck changed the title Update: Upgrade MediaElement.js (fixes #298) Breaking: Upgrade MediaElement.js (fixes #298) Aug 15, 2024
@swashbuck swashbuck changed the title Breaking: Upgrade MediaElement.js (fixes #298 #297 #232) Breaking: Upgrade MediaElement.js to 7.0.7 (fixes #298 #297 #232) Jun 9, 2025
@swashbuck

This comment was marked as resolved.

@oliverfoster
Copy link
Member

@joe-allen-89

When exiting fullscreen, the screenreader jumps to the top of the page (this was also an issue with latest media release)

@danielghost has a core fix for this hopefully

@swashbuck

This comment was marked as resolved.

@oliverfoster

This comment was marked as resolved.

@joe-allen-89

This comment was marked as resolved.

@oliverfoster oliverfoster self-requested a review June 11, 2025 20:09
@swashbuck

This comment was marked as outdated.

@swashbuck

This comment was marked as outdated.

Copy link
Contributor

Choose a reason for hiding this comment

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

👀

@joe-allen-89 joe-allen-89 merged commit 58805d0 into master Jul 28, 2025
@joe-allen-89 joe-allen-89 deleted the issue/298 branch July 28, 2025 13:48
@github-project-automation github-project-automation bot moved this from Needs Reviewing to Recently Released in adapt_framework: The TODO Board Jul 28, 2025
github-actions bot pushed a commit that referenced this pull request Jul 28, 2025
# [7.0.0](v6.9.2...v7.0.0) (2025-07-28)

### Breaking

* Upgrade MediaElement.js to 7.0.7 (fixes #298 #297 #232) (#299) ([58805d0](58805d0)), closes [#298](#298) [#297](#297) [#232](#232) [#299](#299) [#239](#239) [#311](#311)
@github-actions
Copy link

🎉 This PR is included in version 7.0.0 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

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.

MediaElement.js upgrade

6 participants

Comments