diff --git a/mediaelement.js b/mediaelement.js
index ffbbc04..6a2afcc 100644
--- a/mediaelement.js
+++ b/mediaelement.js
@@ -7,13 +7,13 @@
       if (settings.mediaelement !== undefined) {
         // @todo Remove anonymous function.
         $.each(settings.mediaelement, function(selector, options) {
-          var opts;
+          options.opts.pluginPath = settings.pluginPath;
           $(selector, context).once('mediaelement', function() {
             if (options.controls) {
               $(this).mediaelementplayer(options.opts);
             }
             else {
-              $(this).mediaelement();
+              $(this).mediaelement(options.opts);
             }
           });
         });
@@ -22,7 +22,7 @@
       // run after any other selectors.
       if (settings.mediaelementAll !== undefined) {
         $('video,audio', context).once('mediaelement', function() {
-          $(this).mediaelementplayer();
+          $(this).mediaelementplayer({pluginPath: settings.pluginPath}));
         });
       }
     }
diff --git a/mediaelement.module b/mediaelement.module
index 822941d..bb977db 100644
--- a/mediaelement.module
+++ b/mediaelement.module
@@ -58,12 +58,13 @@ function mediaelement_library() {
     '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),
+      // Pass the pluginPath to mediaelement.js so it can load its other assets
+      // in all situations. This also allow the javascript to be preprocessed.
+      array(
+        'type' => 'setting',
+        'data' => array('pluginPath' => base_path() . $path . '/build/'),
+      ),
+      $path . '/build/mediaelement-and-player.min.js' => array('group' => JS_LIBRARY),
     ),
     'css' => array(
       $path . '/build/mediaelementplayer.min.css' => array('group' => CSS_SYSTEM),
