I believe
$settings = array('mediaelement' => array(
'.class-name' => array(
'controls' => TRUE,
'opts' => array(), // This is the mediaelement scripts options.
);
));
drupal_add_js($settings, 'setting');
should be
$settings = array(
'mediaelement' => array(
'.class-name' => array(
'controls' => TRUE,
'opts' => array(), // This is the mediaelement scripts options.
)
));
drupal_add_js($settings, 'setting');
Otherwise you'll get a php error:
Parse error: syntax error, unexpected ';', expecting ')' in /.../sites/all/themes/abc/template.php on line 122
| Comment | File | Size | Author |
|---|---|---|---|
| #1 | mediaelement-readme.patch | 339 bytes | lyricnz |
Comments
Comment #0.0
s.daniel commentedremoved theme name
Comment #1
lyricnz commentedSemi-colon removing patch attached.
Comment #2
mgiffordI can verify that. This simple patch fixes the php error I ran into as well. I wonder though if it might make more sense to expand the documentation a bit in the README.txt file.
You shouldn't have to do this step if you've checked the "Enable MediaElement.js site wide" box here /admin/config/media/mediaelement
Without enabling that you'd need to paste PHP code into a node like this:
And then include the video with:
<video width="360" height="203" id="player1" src="/sites/all/libraries/mediaelement/media/echo-hereweare.mp4"><p>Your browser leaves much to be desired.</p></video>Looking at the http://mediaelementjs.com page though, I'm not sure if this Drupal module already does the work of "Convert all and tags to MediaElement.js using jQuery" or if we also need to add:
I'd also like to recommend mentioning http://www.mirovideoconverter.com which can be useful to create the various different video types.
Comment #3
dave reidCommitted with http://drupalcode.org/project/mediaelement.git/commit/d98b7e7
Comment #4.0
(not verified) commentedsetting is actually correct.