[wp-trac] [WordPress Trac] #42720: Remove unnecessary MediaElement.js files
WordPress Trac
noreply at wordpress.org
Tue Nov 28 03:11:42 UTC 2017
#42720: Remove unnecessary MediaElement.js files
----------------------------+-----------------
Reporter: SergeyBiryukov | Owner:
Type: enhancement | Status: new
Priority: normal | Milestone: 5.0
Component: Media | Version: 4.9
Severity: normal | Keywords:
Focuses: |
----------------------------+-----------------
Looking at the recent MediaElement.js upgrades in [41198], [41240],
[41877], its directory size has grown almost 6 times (!) from ~289 KB in
4.8.x to ~1600 KB in 4.9. I think we can remove some redundant files
there.
In 4.8.x:
* `lang` directory was not included, as WordPress uses its own
translations.
* Only `mediaelement-and-player.js` was included, and only in minified
form:
{{{
mediaelementplayer.min.css
mediaelement-and-player.min.js
}}}
* WP files were included in both minified and non-minified form:
{{{
wp-mediaelement.css
wp-mediaelement.min.css
wp-mediaelement.js
wp-mediaelement.min.js
wp-playlist.js
wp-playlist.min.js
}}}
In 4.9:
* `lang` directory is included, despite WordPress using its own
translations.
* `mediaelement.js` and `mediaelement-and-player.js` are included, both
in non-minified and minified form:
{{{
mediaelementplayer.css
mediaelementplayer.min.css
mediaelement-and-player.js
mediaelement-and-player.min.js
mediaelement.js
mediaelement.min.js
}}}
* WP files are only included in non-minified form:
{{{
wp-mediaelement.css
wp-mediaelement.js
wp-playlist.js
}}}
* Legacy CSS files are included, both in minified and non-minified form:
{{{
mediaelementplayer-legacy.css
mediaelementplayer-legacy.min.css
}}}
* Five renderers are included, both in minified and non-minified form, of
which only `vimeo.min.js` is used:
{{{
dailymotion.js
dailymotion.min.js
facebook.js
facebook.min.js
soundcloud.js
soundcloud.min.js
twitch.js
twitch.min.js
vimeo.js
vimeo.min.js
}}}
Suggestions:
* Remove the `lang` directory.
* Remove `mediaelementplayer.css`, `mediaelement(.min).js`, and
`mediaelement-and-player.js`. Keep `mediaelementplayer.min.css` and
`mediaelement-and-player.min.js`.
* Include WP files in minified form as well.
* Do we need the legacy CSS files? If yes, remove `mediaelementplayer-
legacy.css`, keep `mediaelementplayer-legacy.min.css`, which is the only
one used anyway.
* Do we need all the renderers? If yes, remove non-minified files, keep
minified ones.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/42720>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list