Forums

Home » Liferay Portal » English » 3. Development

Combination View Flat View Tree View
Threads [ Previous | Next ]
toggle
Sudarshan Kumar
Playing .flv file using flowplayer in liferay
February 21, 2012 9:35 PM
Answer

Sudarshan Kumar

Rank: Junior Member

Posts: 42

Join Date: August 12, 2011

Recent Posts

Hi all ,

I got the solution that how to play .flv file in Web Content display Using flowplayer. These are the steps I followed:

Step1: Download three files flowplayer.controls-3.2.5.swf, flowplayer-3.2.6.min.js, flowplayer-3.2.7.swf .
Step2: Create a folder named "flowplayer " under tomcat- 6.0.29\webapps\ROOT\html\js and put these three files under this folder.
Step3: Now go to control panel click on Web Content and go to structure tab and click on add structure button. Check on auto generated id and give the name of structure like "FlowPlayerStructure" then click on Launch Editor and remove the previous entry and and paste the below code then click on save button.

<root>
<dynamic-element name='videotitle' type='text' index-type='' repeatable='false'></dynamic-element>
<dynamic-element name='videodescription' type='text' index-type='' repeatable='false'></dynamic-element>
<dynamic-element name='file' type='document_library' index-type='' repeatable='false'></dynamic-element>
</root>


Step3: Now go to control panel click on Web Content and go to template tab and click on add template button.Check on auto generated id and give the name of template like "FlowPlayertemplate ".select the structure here (FlowPlayerStructure) then click on Launch Editor and remove the previous entry and and paste the below code and then click on save button.

<object id="flowplayer" width="500" height="300" bgcolor="#000000"
data="/html/js/flowplayer/flowplayer-3.2.7.swf"
type="application/x-shockwave-flash">
<param name="movie" value="/html/js/flowplayer/flowplayer-3.2.7.swf" />
<param name="allowfullscreen" value="false" />
<param name="flashvars" value='config={
"clip":"$file.data"}}' />
</object>
<font size="2px" color="#4F699E"><b>$videotitle.data</b></font></br></br>
$videodescription.data


Step4: Download any .flv file and upload it in a document library
Step5: Drop a web content display portlet on the page and click on add web content in the web content display portlet.
Step6: check as autogenerated id checkbox and give name like "flowplayer " and select the template which is created just now "FlowPlayertemplate ". Put some video title and description and select the file from document library and click on publish button. Now go to that page you will able to play the selected video.


Thanks
Sudarshan
Attachments: flowplayer-3.2.6.min.js (16.4k), flowplayer-3.2.7.swf (117.4k), flowplayer.controls-3.2.5.swf (36.0k)
Mayur Patel
RE: Playing .flv file using flowplayer in liferay
February 22, 2012 5:16 AM
Answer

Mayur Patel

Rank: Expert

Posts: 294

Join Date: November 17, 2010

Recent Posts

Thanks for sharing information Sudarshan emoticon
Anil T
RE: Playing .flv file using flowplayer in liferay
April 10, 2012 7:20 AM
Answer

Anil T

Rank: Regular Member

Posts: 185

Join Date: January 14, 2012

Recent Posts

Hi Sudarshan,

Is flow player supports all types of file formats or only some specific formats?
If it supports some specific video formats then please share the list.

Thanks
Sudarshan Kumar
RE: Playing .flv file using flowplayer in liferay
April 10, 2012 11:53 AM
Answer

Sudarshan Kumar

Rank: Junior Member

Posts: 42

Join Date: August 12, 2011

Recent Posts

Anil T:
Hi Sudarshan,

Is flow player supports all types of file formats or only some specific formats?
If it supports some specific video formats then please share the list.

Thanks



Hi Anil

I have not tried with other format of file. According to my understanding it doesn't support all type of file format.its mainly support .flv files.


Thanks
Sudarshan
Anil T
RE: Playing .flv file using flowplayer in liferay
April 11, 2012 11:24 AM
Answer

Anil T

Rank: Regular Member

Posts: 185

Join Date: January 14, 2012

Recent Posts

Thanks for reply sudharshan.

I tried with all types but flowplayer supporting only two types of video formats that are .flv and .mp4.

Thanks for sharing the article flowplayer integration to liferay.

It's really helpful for me.
Raja Seth
RE: Playing .flv file using flowplayer in liferay
September 28, 2012 5:51 AM
Answer

Raja Seth

Rank: Regular Member

Posts: 110

Join Date: August 18, 2011

Recent Posts

Hi Sudarshan,

Thanks for sharing it. I was having a same requirement in my project but I was not allowed to keep anything inside tomcat. I modified the template as below:

<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.7/jquery.js"></script>
<script src="http://releases.flowplayer.org/js/flowplayer-3.2.11.min.js"></script>

<font size="2px" color="#4F699E">
<b>$videotitle.data</b>
</font></br></br>

<object id="flowplayer" width="500" height="300" bgcolor="#000000" data="http://releases.flowplayer.org/swf/flowplayer-3.2.15.swf" type="application/x-shockwave-flash">
<param name="movie" value="http://releases.flowplayer.org/swf/flowplayer-3.2.15.swf" />
<param name="allowfullscreen" value="false" />
<param name="flashvars" value='config={"clip":"http://localhost:8080$file.data"}' />
</object>

$videodescription.data


So it doesn't load the flowplayer-3.2.11.min.js every time when any other page is got refreshed.

Regards,
Raja