[wp-trac] [WordPress Trac] #25243: Allow more nuanced control over mediaelement.js elements
WordPress Trac
noreply at wordpress.org
Sat Mar 29 02:54:55 UTC 2014
#25243: Allow more nuanced control over mediaelement.js elements
------------------------------------------------+--------------------------
Reporter: ericlewis | Owner:
Type: enhancement | Status: new
Priority: normal | Milestone: Awaiting
Component: Media | Review
Severity: normal | Version:
Keywords: dev-feedback 2nd-opinion has-patch | Resolution:
| Focuses:
------------------------------------------------+--------------------------
Changes (by Otto42):
* keywords: dev-feedback 2nd-opinion needs-patch => dev-feedback 2nd-
opinion has-patch
Comment:
A very simple patch would be simply to eliminate the "pluginPath" part of
the wp-mediaelement.js file. This allows code to use the existing
functions to pass new settings parameters to the mediaelementjs code.
25243.diff shows the simplest change that works. Using this, one could
call wp_localize_script like so to give it new parameters:
{{{
wp_localize_script( 'wp-mediaelement', '_wpmejsSettings', array(
'pluginPath' => includes_url( 'js/mediaelement/',
'relative' ),
'features' => array( 'whatever' ),
)
}}}
A filter to change these parameters would be preferable so that multiple
plugins don't step on each other here. But this change would be needed
anyway to allow other parameters than just pluginPath to be passed to the
JS.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/25243#comment:2>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list