论坛

主页 » Liferay Portal » English » 3. Development

组合视图 统一视图 树状图
讨论主题 [ 上一个 | 下一个 ]
toggle
Playin flv files stored in the document_library Tony Fernández García 2008年11月28日 上午12:27
RE: Playin flv files stored in the document_library Minhchau Dang 2008年12月1日 上午10:43
RE: Playin flv files stored in the document_library Tony Fernández García 2008年12月2日 上午3:51
RE: Playin flv files stored in the document_library Tony Fernández García 2008年12月3日 上午7:46
RE: Playin flv files stored in the document_library Mikko T Karppinen 2008年12月22日 上午11:55
RE: Playin flv files stored in the document_library Tony Fernández García 2009年1月7日 上午7:59
RE: Playin flv files stored in the document_library Angelo Immediata 2009年2月4日 上午2:01
Re: [Liferay Forums][3. Development] RE: Playin flv files stored in the doc Santh Chetan Chadalavada 2009年2月4日 上午2:59
Re: [Liferay Forums][3. Development] RE: Playin flv files stored in the doc Santh Chetan Chadalavada 2009年2月4日 上午3:09
RE: Re: [Liferay Forums][3. Development] RE: Playin flv files stored in the Angelo Immediata 2009年2月4日 上午3:16
RE: Re: [Liferay Forums][3. Development] RE: Playin flv files stored in the Angelo Immediata 2009年2月4日 上午9:42
Re: [Liferay Forums][3. Development] RE: Playin flv files stored in the Santh Chetan Chadalavada 2009年2月4日 上午9:51
RE: Re: [Liferay Forums][3. Development] RE: Playin flv files stored in the Angelo Immediata 2009年2月4日 上午10:12
RE: Re: [Liferay Forums][3. Development] RE: Playin flv files stored in the Angelo Immediata 2009年2月5日 上午2:53
RE: Re: [Liferay Forums][3. Development] RE: Playin flv files stored in the Angelo Immediata 2009年2月5日 上午6:10
RE: Re: [Liferay Forums][3. Development] RE: Playin flv files stored in the Krati Gupta 2010年12月22日 下午11:39
RE: Playin flv files stored in the document_library Mike Lim 2009年11月17日 上午9:13
RE: Playin flv files stored in the document_library gerald hemmers 2009年11月18日 上午8:10
RE: Playin flv files stored in the document_library Mike Lim 2009年11月18日 下午10:12
RE: Playin flv files stored in the document_library gerald hemmers 2009年11月19日 上午9:52
RE: Playin flv files stored in the document_library Mike Lim 2009年11月19日 下午8:40
RE: Playin flv files stored in the document_library gerald hemmers 2009年11月20日 上午1:43
RE: Playin flv files stored in the document_library gerald hemmers 2009年12月9日 上午8:24
RE: Playin flv files stored in the document_library dede dede 2010年2月10日 上午7:48
RE: Playin flv files stored in the document_library delang j 2008年12月22日 下午8:34
RE: Playin flv files stored in the document_library Ricard Cabrera Vivó 2009年7月28日 上午6:32
RE: Playin flv files stored in the document_library gerald hemmers 2009年8月17日 上午5:19
RE: Playin flv files stored in the document_library Ivo Ivanov 2011年3月28日 上午8:37
RE: Playin flv files stored in the document_library Ivo Ivanov 2011年3月28日 上午8:40
RE: Playin flv files stored in the document_library Ivo Ivanov 2011年3月28日 上午9:14
RE: Playin flv files stored in the document_library Krati Gupta 2011年3月28日 下午10:50
RE: Playin flv files stored in the document_library Markus B 2011年10月16日 上午4:09
RE: Playin flv files stored in the document_library Suraj Bihari 2011年11月15日 下午2:46
RE: Re: [Liferay Forums][3. Development] RE: Playin flv files stored in the sandeep tripathi 2011年12月13日 下午11:36
RE: Playin flv files stored in the document_library Sudarshan Kumar 2012年1月18日 上午5:11
RE: Playin flv files stored in the document_library Juan Gonzalez 2011年10月16日 上午11:46
Tony Fernández García
Playin flv files stored in the document_library
2008年11月28日 上午12:27
答复

Tony Fernández García

等级: Junior Member

帖子: 76

加入日期: 2008年10月5日

最近的帖子

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
2008年12月1日 上午10:43
答复

Minhchau Dang

LIFERAY STAFF

等级: Expert

帖子: 347

加入日期: 2007年10月22日

最近的帖子

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
2008年12月2日 上午3:51
答复

Tony Fernández García

等级: Junior Member

帖子: 76

加入日期: 2008年10月5日

最近的帖子

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
2008年12月3日 上午7:46
答复

Tony Fernández García

等级: Junior Member

帖子: 76

加入日期: 2008年10月5日

最近的帖子

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
2008年12月22日 上午11:55
答复

Mikko T Karppinen

等级: New Member

帖子: 1

加入日期: 2008年12月22日

最近的帖子

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
2008年12月22日 下午8:34
答复

delang j

等级: Regular Member

帖子: 217

加入日期: 2008年7月13日

最近的帖子

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
2009年1月7日 上午7:59
答复

Tony Fernández García

等级: Junior Member

帖子: 76

加入日期: 2008年10月5日

最近的帖子

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
2009年2月4日 上午2:01
答复

Angelo Immediata

等级: Junior Member

帖子: 77

加入日期: 2006年6月12日

最近的帖子

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
2009年2月4日 上午2:59
答复

Santh Chetan Chadalavada

等级: Junior Member

帖子: 52

加入日期: 2008年5月15日

最近的帖子

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
2009年2月4日 上午3:09
答复

Santh Chetan Chadalavada

等级: Junior Member

帖子: 52

加入日期: 2008年5月15日

最近的帖子

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
2009年2月4日 上午3:16
答复

Angelo Immediata

等级: Junior Member

帖子: 77

加入日期: 2006年6月12日

最近的帖子

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
2009年2月4日 上午9:42
答复

Angelo Immediata

等级: Junior Member

帖子: 77

加入日期: 2006年6月12日

最近的帖子

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
2009年2月4日 上午9:51
答复

Santh Chetan Chadalavada

等级: Junior Member

帖子: 52

加入日期: 2008年5月15日

最近的帖子

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
2009年2月4日 上午10:12
答复

Angelo Immediata

等级: Junior Member

帖子: 77

加入日期: 2006年6月12日

最近的帖子

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
2009年2月5日 上午2:53
答复

Angelo Immediata

等级: Junior Member

帖子: 77

加入日期: 2006年6月12日

最近的帖子

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
附件: LiferayExt.zip (13.9k)
Angelo Immediata
RE: Re: [Liferay Forums][3. Development] RE: Playin flv files stored in the
2009年2月5日 上午6:10
答复

Angelo Immediata

等级: Junior Member

帖子: 77

加入日期: 2006年6月12日

最近的帖子

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
2009年7月28日 上午6:32
答复

Ricard Cabrera Vivó

等级: New Member

帖子: 2

加入日期: 2009年2月20日

最近的帖子

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
2009年8月17日 上午5:19
答复

gerald hemmers

等级: Junior Member

帖子: 88

加入日期: 2008年5月13日

最近的帖子

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
2009年11月17日 上午9:13
答复

Mike Lim

等级: Junior Member

帖子: 28

加入日期: 2009年8月31日

最近的帖子

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
2009年11月18日 上午8:10
答复

gerald hemmers

等级: Junior Member

帖子: 88

加入日期: 2008年5月13日

最近的帖子

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
2009年11月18日 下午10:12
答复

Mike Lim

等级: Junior Member

帖子: 28

加入日期: 2009年8月31日

最近的帖子

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
2009年11月19日 上午9:52
答复

gerald hemmers

等级: Junior Member

帖子: 88

加入日期: 2008年5月13日

最近的帖子

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
2009年11月19日 下午8:40
答复

Mike Lim

等级: Junior Member

帖子: 28

加入日期: 2009年8月31日

最近的帖子

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
2009年11月20日 上午1:43
答复

gerald hemmers

等级: Junior Member

帖子: 88

加入日期: 2008年5月13日

最近的帖子

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
2009年12月9日 上午8:24
答复

gerald hemmers

等级: Junior Member

帖子: 88

加入日期: 2008年5月13日

最近的帖子

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
2010年2月10日 上午7:48
答复

dede dede

等级: New Member

帖子: 1

加入日期: 2010年2月10日

最近的帖子

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
2010年12月22日 下午11:39
答复

Krati Gupta

等级: Regular Member

帖子: 113

加入日期: 2008年12月5日

最近的帖子

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
2011年3月28日 上午8:37
答复

Ivo Ivanov

等级: New Member

帖子: 4

加入日期: 2010年7月28日

最近的帖子

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
2011年3月28日 上午8:40
答复

Ivo Ivanov

等级: New Member

帖子: 4

加入日期: 2010年7月28日

最近的帖子

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
2011年3月28日 上午9:14
答复

Ivo Ivanov

等级: New Member

帖子: 4

加入日期: 2010年7月28日

最近的帖子

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
2011年3月28日 下午10:50
答复

Krati Gupta

等级: Regular Member

帖子: 113

加入日期: 2008年12月5日

最近的帖子

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
2011年10月16日 上午4:09
答复

Markus B

等级: New Member

帖子: 17

加入日期: 2009年1月8日

最近的帖子

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
2011年10月16日 上午11:46
答复

Juan Gonzalez

LIFERAY STAFF

等级: Liferay Legend

帖子: 1215

加入日期: 2008年10月28日

最近的帖子

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
2011年11月15日 下午2:46
答复

Suraj Bihari

等级: Junior Member

帖子: 35

加入日期: 2011年5月20日

最近的帖子

Thanks Markus!
sandeep tripathi
RE: Re: [Liferay Forums][3. Development] RE: Playin flv files stored in the
2011年12月13日 下午11:36
答复

sandeep tripathi

等级: Regular Member

帖子: 100

加入日期: 2011年10月19日

最近的帖子

thanks everyone !!!!! it gave me start to make gallery like youtube one
Sudarshan Kumar
RE: Playin flv files stored in the document_library
2012年1月18日 上午5:11
答复

Sudarshan Kumar

等级: Junior Member

帖子: 42

加入日期: 2011年8月12日

最近的帖子

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