Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
wants to merge 65 commits into
base: master
Choose a base branch
from

Conversation

swashbuck
Copy link
Contributor

@swashbuck swashbuck commented Aug 14, 2024

Fix #298 #297 #232

Breaking

  • Upgrades MediaElement.js from v2.21.2 to v7.0.5. 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.

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

Dependencies

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 and others added 23 commits September 3, 2024 15:40
…break playing on touch devices and may no longer be needed
@swashbuck swashbuck changed the title Breaking: Upgrade MediaElement.js (fixes #298) Breaking: Upgrade MediaElement.js (fixes #298 #297) Oct 3, 2024
@swashbuck swashbuck changed the title Breaking: Upgrade MediaElement.js (fixes #298 #297) Breaking: Upgrade MediaElement.js (fixes #298 #297 #232) Oct 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Needs Reviewing
Development

Successfully merging this pull request may close these issues.

MediaElement.js upgrade
2 participants