Forums

Home » Liferay Portal » English » 3. Development

Combination View Flat View Tree View
Threads [ Previous | Next ]
toggle
Playin flv files stored in the document_library Tony Fernández García November 28, 2008 12:27 AM
RE: Playin flv files stored in the document_library Minhchau Dang December 1, 2008 10:43 AM
RE: Playin flv files stored in the document_library Tony Fernández García December 2, 2008 3:51 AM
RE: Playin flv files stored in the document_library Tony Fernández García December 3, 2008 7:46 AM
RE: Playin flv files stored in the document_library Mikko T Karppinen December 22, 2008 11:55 AM
RE: Playin flv files stored in the document_library Tony Fernández García January 7, 2009 7:59 AM
RE: Playin flv files stored in the document_library Angelo Immediata February 4, 2009 2:01 AM
Re: [Liferay Forums][3. Development] RE: Playin flv files stored in the doc Santh Chetan Chadalavada February 4, 2009 2:59 AM
Re: [Liferay Forums][3. Development] RE: Playin flv files stored in the doc Santh Chetan Chadalavada February 4, 2009 3:09 AM
RE: Re: [Liferay Forums][3. Development] RE: Playin flv files stored in the Angelo Immediata February 4, 2009 3:16 AM
RE: Re: [Liferay Forums][3. Development] RE: Playin flv files stored in the Angelo Immediata February 4, 2009 9:42 AM
Re: [Liferay Forums][3. Development] RE: Playin flv files stored in the Santh Chetan Chadalavada February 4, 2009 9:51 AM
RE: Re: [Liferay Forums][3. Development] RE: Playin flv files stored in the Angelo Immediata February 4, 2009 10:12 AM
RE: Re: [Liferay Forums][3. Development] RE: Playin flv files stored in the Angelo Immediata February 5, 2009 2:53 AM
RE: Re: [Liferay Forums][3. Development] RE: Playin flv files stored in the Angelo Immediata February 5, 2009 6:10 AM
RE: Re: [Liferay Forums][3. Development] RE: Playin flv files stored in the Krati Gupta December 22, 2010 11:39 PM
RE: Playin flv files stored in the document_library Mike Lim November 17, 2009 9:13 AM
RE: Playin flv files stored in the document_library gerald hemmers November 18, 2009 8:10 AM
RE: Playin flv files stored in the document_library Mike Lim November 18, 2009 10:12 PM
RE: Playin flv files stored in the document_library gerald hemmers November 19, 2009 9:52 AM
RE: Playin flv files stored in the document_library Mike Lim November 19, 2009 8:40 PM
RE: Playin flv files stored in the document_library gerald hemmers November 20, 2009 1:43 AM
RE: Playin flv files stored in the document_library gerald hemmers December 9, 2009 8:24 AM
RE: Playin flv files stored in the document_library dede dede February 10, 2010 7:48 AM
RE: Playin flv files stored in the document_library delang j December 22, 2008 8:34 PM
RE: Playin flv files stored in the document_library Ricard Cabrera Vivó July 28, 2009 6:32 AM
RE: Playin flv files stored in the document_library gerald hemmers August 17, 2009 5:19 AM
RE: Playin flv files stored in the document_library Ivo Ivanov March 28, 2011 8:37 AM
RE: Playin flv files stored in the document_library Ivo Ivanov March 28, 2011 8:40 AM
RE: Playin flv files stored in the document_library Ivo Ivanov March 28, 2011 9:14 AM
RE: Playin flv files stored in the document_library Krati Gupta March 28, 2011 10:50 PM
RE: Playin flv files stored in the document_library Markus B October 16, 2011 4:09 AM
RE: Playin flv files stored in the document_library Suraj Bihari November 15, 2011 2:46 PM
RE: Re: [Liferay Forums][3. Development] RE: Playin flv files stored in the sandeep tripathi December 13, 2011 11:36 PM
RE: Playin flv files stored in the document_library Sudarshan Kumar January 18, 2012 5:11 AM
RE: Playin flv files stored in the document_library Juan Gonzalez October 16, 2011 11:46 AM
Tony Fernández García
Playin flv files stored in the document_library
November 28, 2008 12:27 AM
Answer

Tony Fernández García

Rank: Junior Member

Posts: 76

Join Date: October 5, 2008

Recent Posts

Hi,

I am working on a portlet to show .flv videos stored on the document_library, for that I use a flash component that play the video which receibe the url of the .flv file. The problem is that the video is played when the url is local, thats is, like "/html/portlet/video/...",but when it receibe a document_library url, the video is not reproduced. Any body knows the reason?

I have seen on that post http://www.liferay.com/web/guest/community/forums/-/message_boards/message/343439 that the reason is that bug http://issues.liferay.com/browse/LEP-4487, but it is closed since 4.3.6 version.

Had somebody made the same as me with more luck? Do you know the reason for that?

Thanks,
Tony
Minhchau Dang
RE: Playin flv files stored in the document_library
December 1, 2008 10:43 AM
Answer

Minhchau Dang

LIFERAY STAFF

Rank: Expert

Posts: 349

Join Date: October 22, 2007

Recent Posts

Some Flash applications do not pass along browser cookies when requesting resources. Therefore, whenever the Flash application tries to request a resource, it does so as a guest user.

Without fixing the Flash application, the only fix I can think of is to give Guest users access to the FLV.
Tony Fernández García
RE: Playin flv files stored in the document_library
December 2, 2008 3:51 AM
Answer

Tony Fernández García

Rank: Junior Member

Posts: 76

Join Date: October 5, 2008

Recent Posts

Hi,

I have found a solution for that. First I tried to use the serveResource method from the Portlet but it does not work with the files. Then I maked a Servlet to read the document_library url and return the data of the flv file, and thats work fine. On the configuration window of the portlet I set the document_library url as a portlet preferences, and on the servlet read the preferences from the data base to get the url. For found the portlet which read the preferences I pass to the servlet the portletID.

Whay do not you pass the url to the servlet directly? Because the url from the flv file on the document has several params and if I pass the url directly as a param and read that param, the rest of params (from the original url) are lost.

Now I am not in my office, and I cannot post the code sample. Tomorrow I wil do.

Regards,
Tony
Tony Fernández García
RE: Playin flv files stored in the document_library
December 3, 2008 7:46 AM
Answer

Tony Fernández García

Rank: Junior Member

Posts: 76

Join Date: October 5, 2008

Recent Posts

Easiest way,

you only need to encode the url to the document_library document... I feel very fool xD

Regards,
Tony
Mikko T Karppinen
RE: Playin flv files stored in the document_library
December 22, 2008 11:55 AM
Answer

Mikko T Karppinen

Rank: New Member

Posts: 1

Join Date: December 22, 2008

Recent Posts

We've been struggling with the same problems, could you send examples of the code you used to embed the flash player and .flv file from document library.

thanks
delang j
RE: Playin flv files stored in the document_library
December 22, 2008 8:34 PM
Answer

delang j

Rank: Regular Member

Posts: 240

Join Date: July 13, 2008

Recent Posts

Tony Fernández García:
Easiest way,

you only need to encode the url to the document_library document... I feel very fool xD

Regards,
Tony


glad to here that. would you post example code?
Tony Fernández García
RE: Playin flv files stored in the document_library
January 7, 2009 7:59 AM
Answer

Tony Fernández García

Rank: Junior Member

Posts: 76

Join Date: October 5, 2008

Recent Posts

Sorry, I was out from office.

 1
 2<c:choose>
 3    <c:when test="<%= (prefs.getValue("video_source","").length() > 0) %>">
 4    <embed style="z-index: 0" height="290" width="400"
 5            flashvars="config={'autoPlay':false,
 6                      'autoBuffering':true,
 7                      'controlBarBackgroundColor':'0x0D70B0',
 8                      'initialScale':'scale',
 9                      'videoFile':'<%= URLEncoder.encode(prefs.getValue("video_source","")) %>'}"
10            type="application/x-shockwave-flash"
11            quality="high"
12            allowscriptaccess="always"
13            allowfullscreen="true"
14            src="/html/portlet/ext/video/<%=prefs.getValue("color_video_player","") %>.swf"
15            wmode="opaque" />
16    </c:when>
17   
18</c:choose>


With the src param you specify the player of the file. and with the videoURL the .flv file to play.

I use FlowPlayer to show the .flv files. You can download that from www.sourceforge.net

Regards,
Tony
Angelo Immediata
RE: Playin flv files stored in the document_library
February 4, 2009 2:01 AM
Answer

Angelo Immediata

Rank: Junior Member

Posts: 77

Join Date: June 12, 2006

Recent Posts

HI Tony

We are having the same problem and i can't solve it.
May u post all the code u develop?
Are u using the Liferay CMS to take the flv file?
Thanks
Angelo
Santh Chetan Chadalavada
Re: [Liferay Forums][3. Development] RE: Playin flv files stored in the doc
February 4, 2009 2:59 AM
Answer

Santh Chetan Chadalavada

Rank: Junior Member

Posts: 52

Join Date: May 15, 2008

Recent Posts

Angelo Immediata from liferay.com wrote:
> HI Tony
>
> We are having the same problem and i can't solve it.
> May u post all the code u develop?
> Are u using the Liferay CMS to take the flv file?
> Thanks
> Angelo
> --
> Liferay Message Boards
> http://www.liferay.com/web/guest/community/forums/-/message_boards/message/2096428
> mb.239390.2096428@events.liferay.com
> http://www.liferay.com
Tony has already posted the code. you need to escape the document
library url otherwise the flashvars will consider parameter after "&"
as a separate variable and will miss the actual document library url
give by you. Use firebug to figure out what url you are acutally passing
in the
flashvars and then try to escape ur url.
Santh Chetan Chadalavada
Re: [Liferay Forums][3. Development] RE: Playin flv files stored in the doc
February 4, 2009 3:09 AM
Answer

Santh Chetan Chadalavada

Rank: Junior Member

Posts: 52

Join Date: May 15, 2008

Recent Posts

Simple thing is to get the document library url and then escape it and
then pass it.

Use StringUtil api to replace ?, uuid=, &
flashVariables = <Your Vars>;
flashVariables = StringUtil.replace(flashVariables, "?", "%3F");
flashVariables = StringUtil.replace(flashVariables, "uuid=",
"uuid%3D");
flashVariables = StringUtil.replace(flashVariables, "&", "%26");

Pass this guy now to you flashplayer and see.

Chetan
Santh Chetan Chadalavada from liferay.com wrote:
> Angelo Immediata from liferay.com wrote:
> > HI Tony
> >
> > We are having the same problem and i can't solve it.
> > May u post all the code u develop?
> > Are u using the Liferay CMS to take the flv file?
> > Thanks
> > Angelo
> > --
> > Liferay Message Boards
> >
> http://www.liferay.com/web/guest/community/forums/-/message_boards/message/2096428
> > mb.239390.2096428@events.liferay.com
> > http://www.liferay.com
> Tony has already posted the code. you need to escape the document
> library url otherwise the flashvars will consider parameter after "&"
> as a separate variable and will miss the actual document library url
> give by you. Use firebug to figure out what url you are acutally passing
> in the
> flashvars and then try to escape ur url.
> --
> Liferay Message Boards
>
> mb.239390.2097045@events.liferay.com
> http://www.liferay.com
Angelo Immediata
RE: Re: [Liferay Forums][3. Development] RE: Playin flv files stored in the
February 4, 2009 3:16 AM
Answer

Angelo Immediata

Rank: Junior Member

Posts: 77

Join Date: June 12, 2006

Recent Posts

Hello

First of all very thanx for your answers.

I have this situation. I need to use Liferay CMS; i need to build a VM template where i want to display the video stored in the document library.
Here what i did:

  • Uploaded the flv video in the document library
  • Built a structure.xml file where one field is a document_library type
  • Build a VM structure file to match with the structure file


Well it seems to me that in my VM file i don't have any velocity-context oriented variable to help pme in escaping the document_library URL

Do u know if there are any kind of viariables? r where i can "tell" Liferay to add some velocity variables?

Thank u
Angelo
Angelo Immediata
RE: Re: [Liferay Forums][3. Development] RE: Playin flv files stored in the
February 4, 2009 9:42 AM
Answer

Angelo Immediata

Rank: Junior Member

Posts: 77

Join Date: June 12, 2006

Recent Posts

Hi
Here what i have done:
  • I modified the JournalVmUtil class by adding the URLEncoder
  • Created my structure file
  • In my structure file i encoded the $Video.getData()

Now i can see my player but i can't run my flv video.
Here there is my velocity template:
 1
 2#set($nuoviDati=$mioUrlEncoderAngelo.codifica($Video.getData()))
 3<script type="text/javascript">
 4  swfobject.embedSWF("/html/js/flashutils/player.swf", "myContent", "300", "120", "9.0.0", "$nuoviDati");
 5</script>
 6<div id="myContent">
 7  <h1>Alternative content</h1>
 8 <p><a href="http://www.adobe.com/go/getflashplayer"><img src="http://www.adobe.com/images/shared/download_buttons/get_flash_player.gif" alt="Get Adobe Flash player" /></a></p>
 9</div>

The method codifica is so implemented:
 1
 2    public String codifica(String str){
 3       
 4        try {
 5            return URLEncoder.encode(str, "UTF-8");
 6        } catch (UnsupportedEncodingException e) {
 7            
 8            e.printStackTrace();
 9            return str;
10        }
11    }

So...as suggested i simply took the document library url and i encoded it in UTF-8.
I'm using, in my velocity script, swfobject version 2.1
Any help is appreciated.
Thanx
Angelo
Santh Chetan Chadalavada
Re: [Liferay Forums][3. Development] RE: Playin flv files stored in the
February 4, 2009 9:51 AM
Answer

Santh Chetan Chadalavada

Rank: Junior Member

Posts: 52

Join Date: May 15, 2008

Recent Posts

How big is ur flv file. if player doesn;t understand the mime type it
will try to download the whole file and play it. Is that the case???
Angelo Immediata from liferay.com wrote:
> Hi
> Here what i have done:
>
> * I modified the JournalVmUtil class by adding the URLEncoder
> * Created my structure file
> * In my structure file i encoded the $Video.getData()
>
>
> Now i can see my player but i can't run my flv video.
> Here there is my velocity template:
> 1
> 2#set($nuoviDati=$mioUrlEncoderAngelo.codifica($Video.getData()))
> 3<script type="text/javascript">
> 4 swfobject.embedSWF("/html/js/flashutils/player.swf", "myContent",
> "300", "120", "9.0.0", "$nuoviDati");
> 5</script>
> 6<div id="myContent">
> 7 <h1>Alternative content</h1>
> 8 <p><a href="http://www.adobe.com/go/getflashplayer"><img
> src="http://www.adobe.com/images/shared/download_buttons/get_flash_player.gif"
> alt="Get Adobe Flash player" /></a></p>
> 9</div>
>
> The method *codifica* is so implemented:
> 1
> 2 public String codifica(String str){
> 3
> 4 try {
> 5 return URLEncoder.encode(str, "UTF-8");
> 6 } catch (UnsupportedEncodingException e) {
> 7
> 8 e.printStackTrace();
> 9 return str;
> 10 }
> 11 }
>
> So...as suggested i simply took the document library url and i encoded
> it in UTF-8.
> I'm using, in my velocity script, swfobject version 2.1
> Any help is appreciated.
> Thanx
> Angelo
> --
> Liferay Message Boards
> http://www.liferay.com/web/guest/community/forums/-/message_boards/message/2100265
> mb.239390.2100265@events.liferay.com
> http://www.liferay.com
Angelo Immediata
RE: Re: [Liferay Forums][3. Development] RE: Playin flv files stored in the
February 4, 2009 10:12 AM
Answer

Angelo Immediata

Rank: Junior Member

Posts: 77

Join Date: June 12, 2006

Recent Posts

My file (a sampel file) is around 2.5 MB.
What is making me crazy is that if i put my flv file under root and i don't use the $Video.getData() but something like /html/js/flashutils/myvideo.flv all works correctly...
I really can't understand....
Angelo Immediata
RE: Re: [Liferay Forums][3. Development] RE: Playin flv files stored in the
February 5, 2009 2:53 AM
Answer

Angelo Immediata

Rank: Junior Member

Posts: 77

Join Date: June 12, 2006

Recent Posts

Hi all.
Finally i won. I'm able to show a flv video stored in the document library by using the Liferay CMS. I use the flowplayer player fro showing flv videos.
Here there are the steps i followed:

My template file is this one:
1
2#set($encodedUrl=$encoderUtility.codifica($Video.getData()))
3<script>    flowplayer("player", "/html/js/flashutils/flowplayer-3.0.5.swf");
4</script>
5<a href="$encodedUrl" style="display:block;width:400px;height:300px" id="player">
6</a>

I add the source file in the file LiferayExt.zip
I hope this can help others users.
Regards,
Angelo
Attachments: LiferayExt.zip (13.9k)
Angelo Immediata
RE: Re: [Liferay Forums][3. Development] RE: Playin flv files stored in the
February 5, 2009 6:10 AM
Answer

Angelo Immediata

Rank: Junior Member

Posts: 77

Join Date: June 12, 2006

Recent Posts

Hi all.
I have forgotten to tell you that my liferay version is 5.2.1
Regards,
Angelo
Ricard Cabrera Vivó
RE: Playin flv files stored in the document_library
July 28, 2009 6:32 AM
Answer

Ricard Cabrera Vivó

Rank: New Member

Posts: 2

Join Date: February 20, 2009

Recent Posts

Hi, first post here. I hope it can be helpful.

I have the same problem with JW FLV Media Player and Liferay 5.2. I've read all your suggestions but I don't want to modify Liferay source code. What I've done is to replace the "invalid" characters for the corresponding escaped characters using Javascript.

My code it's only a velocity template:

 1
 2...
 3#if ($video.getData()!= "")
 4<p id='player_multimedia'>The player will show in this paragraph</p>
 5<script type='text/javascript' src='/html/media/swfobject.js'></script>
 6<script type='text/javascript'>
 7var s1 = new SWFObject('/html/media/player.swf','player','400','300','9');
 8s1.addParam('allowfullscreen','true');
 9s1.addParam('allowscriptaccess','always');
10var str = '$video.getData()';
11[b]str = str.replace(/\?/g,"%3F");
12str = str.replace(/\&/g,"%26");
13str = str.replace(/=/g,"%3D");[/b]
14s1.addParam('flashvars','file=' + str);
15s1.write('player_multimedia');
16</script>
17#end
18...


It's not the best way but, it works.
Bye!
gerald hemmers
RE: Playin flv files stored in the document_library
August 17, 2009 5:19 AM
Answer

gerald hemmers

Rank: Junior Member

Posts: 92

Join Date: May 13, 2008

Recent Posts

nice option makes me wondering to do it directly in velocity. but this code doesn't sames to work. the url is coming out right but video player is showing nothing. any clues ?

<p>old var: $flv-file.getData()</p>

#set($mystring = $flv-file.getData())
#set($mystring = $mystring.replaceAll("\?", "%3F"))
#set($mystring =$mystring.replaceAll("\&", "%26"))
#set($mystring =$mystring.replaceAll("\=", "%3D"))

<p>testinG: http://@portal_url@$mystring </p>

thanx,

gerald
Mike Lim
RE: Playin flv files stored in the document_library
November 17, 2009 9:13 AM
Answer

Mike Lim

Rank: Junior Member

Posts: 28

Join Date: August 31, 2009

Recent Posts

Hello, which source did you try to modify with these codes? I'm also trying to launch an FLV video to flow player using liferay 5.2.3 but the player doesn't seem to understand the URL. I used those given from the document library URL. I also tried the download URL but neither of them worked.
gerald hemmers
RE: Playin flv files stored in the document_library
November 18, 2009 8:10 AM
Answer

gerald hemmers

Rank: Junior Member

Posts: 92

Join Date: May 13, 2008

Recent Posts

i tried to include the code in the velocity template through the template options in your webcontent. But that didn't work. So adding the code to the source file is probably the easiest way i think.

Good luck!
Mike Lim
RE: Playin flv files stored in the document_library
November 18, 2009 10:12 PM
Answer

Mike Lim

Rank: Junior Member

Posts: 28

Join Date: August 31, 2009

Recent Posts

Hi Gerald, got it working from your velocity codes!! emoticon thanks!

gerald hemmers:
i tried to include the code in the velocity template through the template options in your webcontent. But that didn't work. So adding the code to the source file is probably the easiest way i think.

Good luck!
gerald hemmers
RE: Playin flv files stored in the document_library
November 19, 2009 9:52 AM
Answer

gerald hemmers

Rank: Junior Member

Posts: 92

Join Date: May 13, 2008

Recent Posts

good to hear i thought it could work with the vm templates, the bad thing is that i wasn't able to successfully implement this. I still don't know why i isn't working. (maybe something with a comma somewhere i don;t know).

Can you post your vm template code and your other actions? Then i can check what i missed. I'm using my own flash video player. that i call from the repository as well. When i have it working i will post this flash video player here with the steps to take and other people may use it if they want.

The problem is i'm not a (java) programmer, but a interaction designer so i understand flash / action script / design but it is a little hard for me to get my deployment up and running. SO everything i can do with the templates i will prefer emoticon
Mike Lim
RE: Playin flv files stored in the document_library
November 19, 2009 8:40 PM
Answer

Mike Lim

Rank: Junior Member

Posts: 28

Join Date: August 31, 2009

Recent Posts

Yes I agree! I prefer this to be done on the VM templates too, to keep its implementation simpler. Here you go:

$video.getData() <-- is my FLV video

#set($vid=$video.getData())
#set($vid=$vid.replaceAll("\?","%3F"))
#set($vid=$vid.replaceAll("\&","%26"))
#set($vid=$vid.replaceAll("\=","%3D"))

Then my URL parameter on the player is this:

url=http://@portal_url@$vid


Then it magically worked. emoticon

Have you set your mime types on portal-ext.properties? If not yet, you should set flv as a video so it wouldn't be recognized as a document. Mine looks like this:

mime.types=\
application/x-srt srt,\
video/x-flv flv

mime.types.content.disposition.inline=srt

That's because I'm trying to use SRT files too for subtitles. Though the inline disposition statement doesn't seem to work. It is still being downloaded as an attachment.

Good luck!
gerald hemmers
RE: Playin flv files stored in the document_library
November 20, 2009 1:43 AM
Answer

gerald hemmers

Rank: Junior Member

Posts: 92

Join Date: May 13, 2008

Recent Posts

thnx for the information.

I will try it out tomorow and will let you know. Subtitles would be a nice feature indeed. I will take a look at this to include this in the flash video player, can't be that hard i think. And then you can let flash handle the subtitles / language settings by passing the var (location of the file) to the flash player.
gerald hemmers
RE: Playin flv files stored in the document_library
December 9, 2009 8:24 AM
Answer

gerald hemmers

Rank: Junior Member

Posts: 92

Join Date: May 13, 2008

Recent Posts

Hi there it been some weeks but i can't get my player to work. this is the code i use in my vm, but i don't have a clue what is going wrong.

<p>old var: $flv-file.getData()</p>

#set($mystring = $flv-file.getData())
#set($mystring = $mystring.replaceAll("\?", "%3F"))
#set($mystring =$mystring.replaceAll("\&", "%26"))
#set($mystring =$mystring.replaceAll("\=", "%3D"))

<p>testinG: http://@portal_url@$mystring </p>

<object width="${width.getData()}" height="${height.getData()}">
<param name="movie" value="http://@portal_url@${swf-file.getData()}"></param>
<param name="FlashVars" value="http://@portal_url@$mystring"></param>
<param name="autostart" value="true"></param>
<embed src="http://@portal_url@${swf-file.getData()}" type="application/x-shockwave-flash" width="${width.getData()}" height="${height.getData()}" FlashVars="http://@portal_url@$mystring"></embed>
</object>

<p>link naar flv file:<a href="http://@portal_url@$flv-file.getData()">hier is die </a></p>

---end of code ----

asa you can see i'm printing out the string and read it into my flash video player using flashvars... but it isn't working while my player is working with a direct link to a file ...
I've set the mime type but that didn't make any difference. My flv file is 13 mb that can't be probleem can it ?

thnx and greeting, gerald
dede dede
RE: Playin flv files stored in the document_library
February 10, 2010 7:48 AM
Answer

dede dede

Rank: New Member

Posts: 1

Join Date: February 10, 2010

Recent Posts

Hi Gerald,

I also encountered this problem using the FlowPlayer and I followed the steps presented here (encoded the characters, changed mime types, etc...) - but nothing helped me. The problem in my case seems to be the fact that FlowPlayer attaches the "?start=0" parameter at the end of the specified URL (in my case http://@portal_url@/c/document_library/get_file%3Fp_l_id%3D10118%26folderId%3D13928%26name%3DDLFE-301.flv).

This way Liferay cannot identify the resource as it considers it's name as "DLFE-301.flv?start=0". I found this problem in the server console and now I chosen a different flv player that can render the file (http://flvplayer.com/) and does not modify the URL.

I hope this helps you in case that you still have this problem emoticon
Krati Gupta
RE: Re: [Liferay Forums][3. Development] RE: Playin flv files stored in the
December 22, 2010 11:39 PM
Answer

Krati Gupta

Rank: Regular Member

Posts: 113

Join Date: December 5, 2008

Recent Posts

HI Angelo,

The structure code is missing and we have to replace the files what you have save as attachment or we want to create a new portlet ???
Ivo Ivanov
RE: Playin flv files stored in the document_library
March 28, 2011 8:37 AM
Answer

Ivo Ivanov

Rank: New Member

Posts: 4

Join Date: July 28, 2010

Recent Posts

Hello All,

I have it working in my LP 6.0.6 CE.

1. Put the 3 files of the flowplayer inside Liferay under the ROOT webapp in /html/js/flowplayer.
2. Inside the Document Library portlet include the javascript in /html/portlet/document_library/init-ext.jsp as

<script type="text/javascript" src="/html/js/flowplayer/flowplayer-3.2.6.min.js" />

3. Inside the Document Library portlet include the javascript in /html/portlet/document_library/view_file_entry.jsp add an A-tag and a SCRIPT-tag. Basically copy and modify the ones that are included with the flowplayer package (there is an index.html file as an example).

4. The URL to the document (the flash video) is already composed on the page. There is a line that calculates the external URL to the doc (close to a LABEL-tag with name URL). Copy the expression from there and your flowplayer will be happy with it.
Ivo Ivanov
RE: Playin flv files stored in the document_library
March 28, 2011 8:40 AM
Answer

Ivo Ivanov

Rank: New Member

Posts: 4

Join Date: July 28, 2010

Recent Posts

By the way, it should be possible to make it play inside the Image Gallery as well. The difficulty here is that the IG portlet needs a glyph to display and one need to figure out how to produce the glyph for the flash video.
Ivo Ivanov
RE: Playin flv files stored in the document_library
March 28, 2011 9:14 AM
Answer

Ivo Ivanov

Rank: New Member

Posts: 4

Join Date: July 28, 2010

Recent Posts

I created a request for a new feature with the developers.

http://issues.liferay.com/browse/LPS-16108
Krati Gupta
RE: Playin flv files stored in the document_library
March 28, 2011 10:50 PM
Answer

Krati Gupta

Rank: Regular Member

Posts: 113

Join Date: December 5, 2008

Recent Posts

I m using Liferay 5.2.3 CE and now please tell how can I implement in this version as I m unable to find view_file_entry.jsp in Documnet library folder .
Markus B
RE: Playin flv files stored in the document_library
October 16, 2011 4:09 AM
Answer

Markus B

Rank: New Member

Posts: 17

Join Date: January 8, 2009

Recent Posts

Maybe this helps someone...
In 6.0.6 there's no need to touch the source, the needed javascript can be included in the template.
You need to have a structure with a video, width, height and autostart property for the following code:

 1
 2<script type="text/javascript" src="/html/js/flowplayer/flowplayer-3.2.6.min.js"></script>
 3
 4<p><a href="$video.getData() " style="display:block;width:$width.getData()px;height:$height.getData()px;" id="player"> </a></p>
 5
 6#if ($video.getData() != '')
 7<script type ="text/javascript">
 8  flowplayer("player", "/html/js/flowplayer/flowplayer-3.2.7.swf", {
 9    clip: {
10        autoPlay: $autostart.getData().isEmpty() ? false : $autostart.getData()
11        },
12        plugins: {
13              controls: {
14                  autoHide: 'fullscreen'
15              }
16        }
17  });
18</script>
19#else
20Please select the video from document library in web content edition menu.
21#end


flowplayer-3.2.6.min.js, flowplayer-3.2.7.swf, flowplayer.controls-3.2.5.swf are in tomcats webapp folder for liferay under "html/js/flowplayer".
Juan Gonzalez
RE: Playin flv files stored in the document_library
October 16, 2011 11:46 AM
Answer

Juan Gonzalez

LIFERAY STAFF

Rank: Liferay Legend

Posts: 2856

Join Date: October 28, 2008

Recent Posts

Tony Fernández García:
Hi,

I am working on a portlet to show .flv videos stored on the document_library, for that I use a flash component that play the video which receibe the url of the .flv file. The problem is that the video is played when the url is local, thats is, like "/html/portlet/video/...",but when it receibe a document_library url, the video is not reproduced. Any body knows the reason?

I have seen on that post http://www.liferay.com/web/guest/community/forums/-/message_boards/message/343439 that the reason is that bug http://issues.liferay.com/browse/LEP-4487, but it is closed since 4.3.6 version.

Had somebody made the same as me with more luck? Do you know the reason for that?

Thanks,
Tony



Hi Tony,

I am happy to tell this is implemented in Liferay 6.1. From now on you'll be able not only to play flv but other video/audio file formats.

You will only have to install Xuggler in Liferay host, enable it from portal-ext.properties or from Control Panel, and add Xuggler required ENV variables (more info here: http://issues.liferay.com/browse/LPS-18004)
Suraj Bihari
RE: Playin flv files stored in the document_library
November 15, 2011 2:46 PM
Answer

Suraj Bihari

Rank: Junior Member

Posts: 42

Join Date: May 20, 2011

Recent Posts

Thanks Markus!
sandeep tripathi
RE: Re: [Liferay Forums][3. Development] RE: Playin flv files stored in the
December 13, 2011 11:36 PM
Answer

sandeep tripathi

Rank: Regular Member

Posts: 100

Join Date: October 19, 2011

Recent Posts

thanks everyone !!!!! it gave me start to make gallery like youtube one
Sudarshan Kumar
RE: Playin flv files stored in the document_library
January 18, 2012 5:11 AM
Answer

Sudarshan Kumar

Rank: Junior Member

Posts: 42

Join Date: August 12, 2011

Recent Posts

Hi Markus


I have seen your post regarding video playing in liferay. According to ur post I have created one structure with the fields video, width, height and autostart .Apart from this I have created one template with ur given code. After that I put one web content display and attached it to created structure and template. But I am not able to play the video file.
Please let me now if anything wrong I am doing


Thanks

Sudarshan