Video Preview Portlet-Liferay Alfresco Integration

Video Preview Portlet can be implemented in couple of ways.

In my scenario, I had to pull the video content from Alfresco and show the preview inside a portlet.

Kept it simple using
JQueryMedia Plug-in.

Steps

1. Copy the JQuery Media Plugin scripts to your web application or if you have a theme, then to the theme folder.

2. Include scripts in the jsp page or the velocity template (in case of Portlet theme)

3. Add the below code in jsp

<script type="text/javascript">
$(function() {

$('a.media').media();

});

</script>

4. To show the video preview add

<a class="media {width:480, height:280}" href=" <YOUR URL HERE >" >VIDEO </a >

Inside href, you need to give the URL for the video. To get the URL need to use the Alfresco API.

Based on the file tye (the JQuery checks for extension) the library will embed the plug-in for the player in the web page.

Ex, if its wmv it will embed Windows Media Player, for flv , flash player, mov ,Qucik time (if available on your browser, else it will ask to download)