The iMediaElement module is based on the MediaElement module for Drupal 7 but uses an improved mediaelement library and provides some super-useful features not found in the drupal.org version:
-
Simple integration with 3rd party media providers (YouTube, Vimeo, etc.)
-
Player skin selection.
-
autoplay
,preload
, andloop
media attributes. -
Support for many mediaelement.js settings through the admin UI.
-
I18n integration with Drupal.
-
~20% smaller player filesize.
Installation and Usage
-
Download/git the improved mediaelement library and extract to
$base_url/sites/all/libraries/imediaelement
-
Optional Customize mediaelement.js for your specific needs ( ads, playlist, sourcechooser, or other features) by editing the
grunt/concat
task or editing the/src/
assets and rebuilding the script.-
cd path/to/imediaelement
-
npm install
: installs grunt & tasks. -
grunt
: compiles all/src/
assets to/local-build/
. -
grunt build
: copies the/local-build/
to/build/
.
-
-
-
Download/git the mediaelement module and extract to
$base_url/sites/$site/modules/imediaelement
-
Enable the module.
Configure global settings
Select the player skin other sitewide options that make you happy:
$base_url/admin/config/media/imediaelement
Configure content fields
Add fields: Your content type should include some type of media.
-
File
: media hosted on your server. -
Link
: media hosted on another domain, i.e. YouTube, Vimeo, etc.
Manage Display: Set the Format to
MediaElement Audio
or
MediaElement Video
- The Format settings allow you to manage attributes specific to that field ( i.e. width, height, autoplay, etc.).
3rd Party Sources
Streaming media from 3rd party sources is accomplished by adding a
link
field displayed as Mediaelement Audio/Video. Youtube & Vimeo are explicitly supported, though
other providers may also be used as long as they provide public file access.
The link may reference either the Embed (
https://www.youtube.com/embed/mUPyVAdbnag
) or Share (
http://youtu.be/mUPyVAdbnag
) source.
It's best to use protocol agnostic (
//youtu.be/mUPyVAdbnag
) links, although that isn't a requirement.