adaptlearning / adapt-contrib-media

A basic media component that displays video and audio. This component uses the HTML5 video and audio specification and has a flash fallback for browsers that don't support HTML5.
GNU General Public License v3.0
7 stars 54 forks source link

MediaElement.js upgrade analysis #298

Open swashbuck opened 1 month ago

swashbuck commented 1 month ago

Subject of the enhancement

Explore updating the MediaElement.js library. This may also require MediaElement.js plugins as that repo contains features like Speed.

The primary goal is to fix some existing a11y issues like #297 and #232. It is unclear if updating the library will fix those. New features should not be considered as part of this analysis.

MediaElement.js Migration Guide

Your environment

swashbuck commented 3 weeks ago

From MediaElement.js version 3.x and later, the namespace has changed from mejs- to mejs__. The classPrefix option allows us to use the legacy namespace. However, the Vanilla styles would still need to be updated to support the new version. This means that users who update the Vanilla theme will be forced to also update the Media plugin in their courses.

If we switch to using the new namespace, we can leave legacy styles in the Vanilla theme. So, older versions of the Media component would be still supported by the Vanilla theme. The downside is that custom plugins that extend the Media plugin may break due to the namespace change. However, I think this is the better option.

Thoughts?

oliverfoster commented 3 weeks ago

How far have you been down either option?

swashbuck commented 3 weeks ago

How far have you been down either option?

I've been using the new namespaces mejs__. However, it wouldn't be too much work to back out of it. Mostly a find and replace chore.

oliverfoster commented 3 weeks ago

I think carrying on with the new mejs__ is probably the sensible option. we'll have to do it at some point. Now seems good.

Are the styles very similar? Do you have any sense of the work required to update the library and keep the legacy css namespace?

swashbuck commented 3 weeks ago

Yeah, that's what I was thinking. They may eventually remove the classPrefix option entirely, so might as well transition now.

I'll be looking into the theme styles currently. Just resolved an issue that was blocking me.

swashbuck commented 2 weeks ago

Should we remove Vimeo support since there is a dedicated plugin for Vimeo? This would remove some complexity since froogaloop.js is used solely for Vimeo afaik.

oliverfoster commented 2 weeks ago

And anything YouTube related for the same reason.