Active
Project:
MediaElement
Version:
8.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
22 Feb 2012 at 07:47 UTC
Updated:
9 Jul 2018 at 17:45 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
idflood commentedThis should apply to both the 7.x-1.x and 7.x-2.x branches.
Comment #2
idflood commentedForgot to remove the 'preprocess' => FALSE
Comment #3
idflood commentedI've tried to use the pluginPath option with mediaelement in a completly different situation but it was a little buggy (no more 404 but plugin wasn't working). Not sure what made it work in some situation or not, but I finally had to rely on the 'preprocess' => FALSE.
Comment #4
tea.time commented+1 for passing the pluginPath to a js setting.
I just worked around the exact same issue due to rendering a node containing a video via an AJAX callback. The problem is that the js files are added with the AJAX callback, so mejs.Utility.getScriptPath() doesn't find them amongst the document's
<script>elements. The pluginPath thus gets stored into mejs.MediaElementDefaults as an empty string.Workaround I used for now, in the case of using the mediaelement.js formatter for a file type: in a preprocess function, alter the #attached array to add
See
mediaelement_field_formatter_view()for the structure of the #attached array.Comment #5
jnettikIn the D8 version we're also pulling in the library via CDN, so I'm curious what the best way to handle this will be if the library isn't installed locally.