RE: Video Portlet like YouTube and take video from Document Library Portlet

thumbnail
601384, modified 16 Years ago. Junior Member Posts: 57 Join Date: 3/26/08 Recent Posts
Hi,

How can I create a video portlet as follows :-
1. Similar to you tube.
2. Should take video files from document library portlet

Also, is there any converter that will be associated with Liferay to convert the video formats to .swf or .flv on the fly when user uploads videos to the document library portlet?

Thanks in advance.
thumbnail
1700842, modified 16 Years ago. Regular Member Posts: 116 Join Date: 12/4/08 Recent Posts
Hello! i'm working in this too.

I've achieved it, using Windows Media Player embebbed in web page, but only works in IExplore, not in firefox.

I've followed these instructions


but the point is that it doesn't work for me in Firefox.

This is my HTML code for the Structure-Theme created:

<object id="MMPlayer1" codebase="http://activex.microsoft.com/activex/controls/mplayer/en/nsmp2inf.cab#Version=5,1,52,701" type="application/x-oleobject" height="238" width="240" align="absmiddle" classid="CLSID:22d6f312-b0f6-11d0-94ab-0080c74c7e95">
<param name="FileName" value="$video.getData()">
<param name="ShowControls" value="0">
<param name="ShowStatusBar" value="0">
<param name="ShowDisplay" value="0">
<param name="DefaultFrame" value="Slide">
<param name="PlayCount" value="1">
<param name="Autostart" value="1">
<embed src="$video.getData()" width="290" height="320" autostart="1" loop="0" align="absmiddle" type="application/x-mplayer2" pluginspage="http://www.microsoft.com/Windows/MediaPlayer/download/default.asp" showcontrols="1" showdisplay="0" showstatusbar="1"> </object>


Many thanks!
thumbnail
554406, modified 16 Years ago. Liferay Master Posts: 803 Join Date: 3/10/08 Recent Posts
Hi manuel,

If you remove that classid then it will work for you and also you have to add one more parameter mediafile.

Thanks
thumbnail
1744072, modified 16 Years ago. Expert Posts: 301 Join Date: 12/10/08 Recent Posts
You need to go with a FLV player. Windows media player has too many problems working with all browsers. FLV players are very easy to use and there are many free samples out there.
thumbnail
1700842, modified 16 Years ago. Regular Member Posts: 116 Join Date: 12/4/08 Recent Posts
Michael Poznecki:
You need to go with a FLV player. Windows media player has too many problems working with all browsers. FLV players are very easy to use and there are many free samples out there.


Hello Jignesh and Michael!

I've tried without the classid and there is no result. emoticon

I'm trying now with flv players ('flowplayer' look nice) and i think the problem is when accesing DocumentLibrary. I get success with internet files but no luck with DL files. I've tried local files in a HTML example and got success

My VM template's code:

<script type="text/javascript" src="/html/themes/my_theme/javascript/flowplayer-3.1.2.min.js"></script>
<p align="center">
<a href="$video.getData()" style="display:block;width:320px;height:290px" id="player"> </a>
</p>
<!-- this will install flowplayer inside previous A- tag. -->
<script>
flowplayer("player", "/html/themes/my_theme/video/flowplayer-3.1.2.swf");
</script>


I have the scripts and .swf player in those locations, so i think the problem is accesing DL from the player embeded in firefox.

'$video.getData()' refers to a DL link, p.e. "/c/document_library/get_file?uuid=16b8ef99-0b76-451c-b92d-708da057e068&groupId=10802"

Many thanks for your comments!
thumbnail
366359, modified 15 Years ago. Junior Member Posts: 32 Join Date: 1/3/08 Recent Posts
Hey

Manuel de la Peña:

'$video.getData()' refers to a DL link, p.e. "/c/document_library/get_file?uuid=16b8ef99-0b76-451c-b92d-708da057e068&groupId=10802"


Encode the Document Library URLs using http://meyerweb.com/eric/tools/dencoder/

Yours

Tuomo
thumbnail
1214041, modified 15 Years ago. Regular Member Posts: 129 Join Date: 8/22/08 Recent Posts
Thanks Manuel de la Peña.It is working fine.
For encoding we can use $escapeTool.url like this
<a href="$escapeTool.url($video.getData())" >

Regards
Sakir
thumbnail
4973225, modified 15 Years ago. Junior Member Posts: 34 Join Date: 5/17/10 Recent Posts
Workaround can be
use aui-swf plugin, configure the "flashVars" param.
include flvplayer to be rendered by aui, and the flv file from document library is passed as source to flvplayer.
Webcontent Structure & template is very helpful in this.
AlloyUI SWF