installation SimpleMedia module

add simplemedia module to your project (no maven project)

Download latest version of openutils-media-bundle from sourceforge and then extract all jar files into the WEB-INF/lib folder in your project.

add simplemedia module to your project (maven project)

Integrating simplemedia module is as simple as adding these few lines to your pom.xml

<dependency>
  <groupId>net.sourceforge.openutils</groupId>
  <artifactId>openutils-mgnlmedia</artifactId>
  <version>[latest version]</version>
</dependency>

Maven will download all required dependencies for you.

how is a media stored?

A media is stored as a jcr node (mgnl:media nodetype) inside the custom jcr repository names "media".

Each media node:

  • has some common nodedatas like title, description, tags, copyright and source
  • has the type nodedata which identifies the media type (image, video, audio, youtube)

The image, audio and video media nodes have the original nodedata in which is stored the original file that users upload.

The video and youtube media nodes have the thumbnail nodedata in which is stored a movie preview frame that users upload.

Image, video and youtube media nodes have the resolutions subnode (mgnl:resolution nodetype) which works as a cache storing all requests for transformed images (resize, effects).

Media nodes are organized in folders using jcr nodes of mgnl:content nodetype.

The media repository is mapped with uri prefix /mediaObject.

simplemedia el functions

Simplemedia module has a tag library containing one tag and a lot of el functions that helps using all its features.

The URI for the tag library is http://net.sourceforge.openutils/mgnlMedia

 

Project info & quick links