1

I've just installed the MediaElement.js module and downloaded the corresponding library but in the modules page it won't turn on because it's not finding the library.

i have other libraries running so i know it's in the right place.

the Media Module version is 7x-1.2 and the on the webpage the version is 2.15.1

i've cleared the cache, run Cron and renamed the folder to mediaelement

how the freak do you trouble shoot something like this? this should take like 10 mins to do and now it's going on 40mins trying to troubleshoot.

2 Answers 2

2

The easiest way to debug something like this is to look at the MediaElement module itself.

Its implement of hook_library() contains the following:

$libraries['mediaelement'] = array(
    'title' => 'Media Element',
    'website' => 'http://mediaelementjs.com/',
    'version' => '2.1.6',
    'js' => array(
      // The mediaelement script detects the path to itself to call other files
      // in the same location. With preprocessing this is problematic as the
      // script is no longer in the same directory as its other assets. There
      // is an option that can be passed into the script with its location.
      // @todo Update all calls to mediaelement to pass in the assets location.
      $path . '/build/mediaelement-and-player.min.js' => array('group' => JS_LIBRARY, 'preprocess' => FALSE),
    ),
    'css' => array(
      $path . '/build/mediaelementplayer.min.css' => array('group' => CSS_SYSTEM),
    ),
  );

So it would appear the module is looking for

  • sites/all/libraries/mediaelement/build/mediaelement-and-player.js
  • sites/all/libraries/mediaelement/build/mediaelementplayer.min.css

If you make sure those files are in the right place, you should have no more issues.

2
  • thanks that is helpful. i looked up that code in the module just to learn. but those files are all there. and i set permission to all read, write, execute.
    – TopTomato
    Commented Oct 23, 2014 at 17:58
  • my other libs are there, working. really stumped.
    – TopTomato
    Commented Oct 23, 2014 at 17:58
1
  • check folder permissions of your sites/all/libraries/mediaelement folder
  • use Firebug or Chrome Developer tools, or equivalent, and check the Console for any javascript errors.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.