Forums

Home » Liferay Portal » English » 2. Using Liferay » General

Combination View Flat View Tree View
Threads [ Previous | Next ]
toggle
LEP 5.1.2 - Flash & WMV : Journal + Document library : IE OK - Firefox NOK Hervé Ménage November 18, 2008 3:10 AM
RE: LEP 5.1.2 - Flash & WMV : Journal + Document library : IE Christopher Donald Sharp November 19, 2008 7:28 AM
RE: LEP 5.1.2 - Flash & WMV : Journal + Document library : IE Hervé Ménage November 19, 2008 8:21 AM
RE: LEP 5.1.2 - Flash & WMV : Journal + Document library : IE Christopher Donald Sharp November 19, 2008 10:45 AM
RE: LEP 5.1.2 - Flash & WMV : Journal + Document library : IE Hervé Ménage November 19, 2008 10:56 PM
RE: LEP 5.1.2 - Flash & WMV : Journal + Document library : IE Hervé Ménage November 20, 2008 8:52 AM
RE: LEP 5.1.2 - Flash & WMV : Journal + Document library : IE Tuomo Kujanpää December 10, 2008 3:53 AM
RE: LEP 5.1.2 - Flash & WMV : Journal + Document library : IE Hervé Ménage December 10, 2008 2:18 AM
RE: LEP 5.1.2 - Flash & WMV : Journal + Document library : IE Tuomo Kujanpää December 10, 2008 4:01 AM
RE: LEP 5.1.2 - Flash & WMV : Journal + Document library : IE Marco Volpe December 23, 2008 7:01 AM
RE: LEP 5.1.2 - Flash & WMV : Journal + Document library : IE Tarun S. Kayasth January 6, 2009 7:17 AM
RE: LEP 5.1.2 - Flash & WMV : Journal + Document library : IE Hervé Ménage January 26, 2009 10:15 PM
RE: LEP 5.1.2 - Flash & WMV : Journal + Document library : IE zaheer mohammed saddapalli January 26, 2009 10:38 PM
RE: LEP 5.1.2 - Flash & WMV : Journal + Document library : IE Hervé Ménage January 26, 2009 10:58 PM
RE: LEP 5.1.2 - Flash & WMV : Journal + Document library : IE zaheer mohammed saddapalli January 27, 2009 12:43 AM
RE: LEP 5.1.2 - Flash & WMV : Journal + Document library : IE Angelo Immediata February 3, 2009 4:37 AM
RE: LEP 5.1.2 - Flash & WMV : Journal + Document library : IE Hervé Ménage February 3, 2009 5:09 AM
RE: LEP 5.1.2 - Flash & WMV : Journal + Document library : IE Angelo Immediata February 5, 2009 3:00 AM
RE: LEP 5.1.2 - Flash & WMV : Journal + Document library : IE Jorge Ferrer February 14, 2009 12:06 PM
Hervé Ménage
LEP 5.1.2 - Flash & WMV : Journal + Document library : IE OK - Firefox NOK
November 18, 2008 3:10 AM
Answer

Hervé Ménage

Rank: Junior Member

Posts: 50

Join Date: March 1, 2007

Recent Posts

Hello,

I have read (I think) all posts about Flash movies in Liferay's forums and on the web....

Here is what I want to do:
- Upload multimedia content (i.e SWF; WMV) in Lifefray's document library
- Display this content in a Journal article

So far, I did the following:
- Uploaded the movies
- Created a Journal structure & template
- Created the article
I am using FlashReplace (which I think is better than Liferay's proveded JS? Same result anyway).

On IE 7:
- Flash OK
- WMV OK
On Google Chrome:
- Flash: flash NOK (plugin Flash 10 present and working)
- WMV OK
ON Firefox 3:
- Nothing works (plugins are installed and running)

It looks like the browser do not handle the content in the same way. The document library returns a MIME-TYPE "application/octet-stream". Could it be a problem ?

Thank you for your help
Regards
Hervé
Christopher Donald Sharp
RE: LEP 5.1.2 - Flash & WMV : Journal + Document library : IE
November 19, 2008 7:28 AM
Answer

Christopher Donald Sharp

Rank: Junior Member

Posts: 27

Join Date: April 16, 2008

Recent Posts

Are you sure the issue is with the browser type? Do both browsers have the same version of the flash plugin installed?
See: http://www.liferay.com/web/guest/community/forums/-/message_boards/message/1503387
Hervé Ménage
RE: LEP 5.1.2 - Flash & WMV : Journal + Document library : IE
November 19, 2008 8:21 AM
Answer

Hervé Ménage

Rank: Junior Member

Posts: 50

Join Date: March 1, 2007

Recent Posts

Hi,

Actually I have read your thread before I post mine... I struggled hours for trying to solve on this problem :-(
The Flash plugin version is "Shockwave Flash 10.0 r12" on Firefox.

The problem does not occur on www.youtube.com

To be more precise, on FF:
- The Flash movie placeholder is displayed (a white area)
- the movie is not started/displayed.
Whereas the WMV movie does not work at all (displays the alternative text).
The WMV plugin is: Windows Media PLayer Plug-in Dynamic Link Library "Npdsplay.dll" (winXP SP3)

Thank you

Hervé
Christopher Donald Sharp
RE: LEP 5.1.2 - Flash & WMV : Journal + Document library : IE
November 19, 2008 10:45 AM
Answer

Christopher Donald Sharp

Rank: Junior Member

Posts: 27

Join Date: April 16, 2008

Recent Posts

The Flash plugin problem does not happen with youtube because youtube does not set that header value.

I don't work with wmv files but the windows media player plugin may not like the server responding with Content-Disposition: Attachment either.
Hervé Ménage
RE: LEP 5.1.2 - Flash & WMV : Journal + Document library : IE
November 19, 2008 10:56 PM
Answer

Hervé Ménage

Rank: Junior Member

Posts: 50

Join Date: March 1, 2007

Recent Posts

Hi Donald,

I see: it means that IE is more "intelligent" when handling headers + MIME-type and selects the best way to display the content, does not it? Although it does not mean it is the standard way to do ;-)

So the document library should be able to set the header to match the mime-type, instead of using the default one, should not it?
At your knowledge, is the a JIRA issue for that?

In the mean time, I am going to try to fix that, and possibly contribute.

Best regards
Hervé
Hervé Ménage
RE: LEP 5.1.2 - Flash & WMV : Journal + Document library : IE
November 20, 2008 8:52 AM
Answer

Hervé Ménage

Rank: Junior Member

Posts: 50

Join Date: March 1, 2007

Recent Posts

Hello,

OK, I fixed it, thanks to your fix + some other things.

a) I added the mime types into portal-ext.properties, thus the content-type header is correct
b) I added a new property portal-ext.properties, where I list all the extension for which I want to force "inline" as content-disposition (e.g. swf,wmv,pdf). I used this property in addition to your fix.
c) The default Windows Media Player plugin for FF 3 is not working. Install "np-mswmp" instead (see: http://support.mozilla.com/fr/kb/Using+the+Windows+Media+Player+plugin+with+Firefox) - deactivate the other one.
d) Here is my journal template, which support SWF & WMV, tested on IE7, FF3 and Google Chrome.
-----------------------------------------------------------
<h1>$reserved-article-title.data</h1>
#if ($Type.getData().equals("SWF"))
<div id="flash_movie"><p>Loading...</p></div>
<script src="/html/js/misc/FlashReplace.js" type="text/javascript"></script>
<script type="text/javascript">
FlashReplace.replace('flash_movie', '$File.getData()', 'flashMovie-id', '$Width.getData()', '$Height.getData()');
</script>


#elseif ($Type.getData().equals("WMV"))

<div id="MediaPlayer"><p>Loading...</p></div>

<script language="javascript">

if (/Firefox[\/\s](\d+\.\d+)/.test(navigator.userAgent)){
document.getElementById('MediaPlayer').innerHTML = "<object id='wmp_p' data='$File.getData()' type='application/x-ms-wmp' width='$Width.getData()' height='$Height.getData()' > \
<param name='autostart' value='true' /> <p>Error - the plugin has not loaded</p> </object>";
} else {
document.getElementById('MediaPlayer').innerHTML = "<object id='wmp_p' width='$Width.getData()' height='$Height.getData()' classid='CLSID:22D6f312-B0F6-11D0-94AB-0080C74C7E95' standby='Loading Windows Media Player components...' type='application/x-oleobject' > \
<param name='Showcontrols' value='True'><param name='autoStart' value='True'>\
<embed type='application/x-mplayer2' src='$File.getData()' name='MediaPlayer' width='$Width.getData()' height='$Height.getData()'></embed></object>";
}

</script>

#end
------------------------------------------------------

Regards
Hervé
Tuomo Kujanpää
RE: LEP 5.1.2 - Flash & WMV : Journal + Document library : IE
December 10, 2008 3:53 AM
Answer

Tuomo Kujanpää

Rank: Junior Member

Posts: 32

Join Date: January 3, 2008

Recent Posts

Hello Hervé,

Hervé Ménage:
Hello,

a) I added the mime types into portal-ext.properties, thus the content-type header is correct
b) I added a new property portal-ext.properties, where I list all the extension for which I want to force "inline" as content-disposition (e.g. swf,wmv,pdf). I used this property in addition to your fix.

Hervé


Could You give the changes, you made to portal-ext.properties?

Mime types I found, but how to add new ones? b) above is also a bit difficult ... which property and values? Did You made some source code changes that read that property?

Yours,

Mikael
Hervé Ménage
RE: LEP 5.1.2 - Flash & WMV : Journal + Document library : IE
December 10, 2008 2:18 AM
Answer

Hervé Ménage

Rank: Junior Member

Posts: 50

Join Date: March 1, 2007

Recent Posts

Hi,

Of course I can give you that.

portal-ext.properties:
 1
 2# Modified property to support multimedia content, add mime types
 3mime.types=\
 4    application/pdf pdf,\
 5      application/vnd.ms-excel xls,\
 6      application/vnd.ms-powerpoint ppt,\
 7      application/msword doc,\
 8    application/x-shockwave-flash swf flv,\
 9    application/x-ms-wmp wmv
10
11# Added property to instruct Liferay to use inline disposition for the following file types
12content.disposition.inline=swf,wmv,pdf,flv


See the attached file for source code and compiled classes.
Attachments: Liferay512Ext.zip (11.7k)
Tuomo Kujanpää
RE: LEP 5.1.2 - Flash & WMV : Journal + Document library : IE
December 10, 2008 4:01 AM
Answer

Tuomo Kujanpää

Rank: Junior Member

Posts: 32

Join Date: January 3, 2008

Recent Posts

Hi Herve,

Thank You very much. I encourage You to contribute this to the project. This is very important improvement.

Yours,

Mikael
Marco Volpe
RE: LEP 5.1.2 - Flash & WMV : Journal + Document library : IE
December 23, 2008 7:01 AM
Answer

Marco Volpe

Rank: New Member

Posts: 16

Join Date: December 23, 2008

Recent Posts

Hi

I've the same problem, I've loaded into the Documento Library a flash object.
I've changed the mime.type properties using the portal-ext.properties as written above.

I've used this template:
------------
<object id="globalnav-embed" classid="clsidemoticon27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0" width="503" height="62" title="I nostri prodotti" >
<param name="movie" value="$content.getData()">
<param name="quality" value="high">
<param name="width" value="503">
<param name="height" value="62">
<param name="type" type="application/x-shockwave-flash">
<param name="pluginspage" value="http://www.macromedia.com/go/getflashplayer">
<param name="src" value="$content.getData()">
<embed id="globalnav-embed" src="$content.getData()" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" width="503" height="62"></embed>
</object>
------------

which works using flash static version. I use Firefox with Firebug for debugging. The returned content-type is right! But I can't see anything. All objects are correctly loaded.

Thanks
Tarun S. Kayasth
RE: LEP 5.1.2 - Flash & WMV : Journal + Document library : IE
January 6, 2009 7:17 AM
Answer

Tarun S. Kayasth

Rank: Regular Member

Posts: 160

Join Date: June 8, 2007

Recent Posts

Hi,

I am also facing similar problem. i have uploaded one .flv and one .swf file.

My Template:
<!--
Template name=video_template
-->


<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,0,0"

width="590" height="352" id="videoplayer" align="middle">
<param name="allowScriptAccess" value="sameDomain" />
<param name="allowFullScreen" value="true" />
<param name="movie" value="/html/player/videoplayer.swf" />
<param name="quality" value="high" />
<param name="scale" value="exactfit" />
<param name="bgcolor" value="#000000" />
<param name="FlashVars" value="videofile=/html/player/$video.getData()">
<embed src="/html/player/videoplayer.swf" FlashVars="videofile=/html/player/$video.getData()" quality="high" scale="exactfit" bgcolor="#000000"

width="590" height="352" name="videoplayer" align="middle" allowScriptAccess="sameDomain" allowFullScreen="true" type="application/x-shockwave-flash"

pluginspage="http://www.macromedia.com/go/getflashplayer" />
</object>

My Structure:
<!-- Add Row
Name = Video
Type = Text Box
-->

<root>
<dynamic-element name='video' type='text_box'></dynamic-element>
</root>

It is loading the .swf file but flv file is not getting loaded.. can any one help me on it?
Hervé Ménage
RE: LEP 5.1.2 - Flash & WMV : Journal + Document library : IE
January 26, 2009 10:15 PM
Answer

Hervé Ménage

Rank: Junior Member

Posts: 50

Join Date: March 1, 2007

Recent Posts

Hello,

Apparently, Liferay will be fixed in 5.2.1, see: http://issues.liferay.com/browse/LPS-1004

Regards
Hervé
zaheer mohammed saddapalli
RE: LEP 5.1.2 - Flash & WMV : Journal + Document library : IE
January 26, 2009 10:38 PM
Answer

zaheer mohammed saddapalli

Rank: Regular Member

Posts: 164

Join Date: January 15, 2008

Recent Posts

Hi Herve,

Is there any patches available in trunk to make this features workable in 5.1.2 version Liferay?


All the time doing migration is bit complicated.
Hervé Ménage
RE: LEP 5.1.2 - Flash & WMV : Journal + Document library : IE
January 26, 2009 10:58 PM
Answer

Hervé Ménage

Rank: Junior Member

Posts: 50

Join Date: March 1, 2007

Recent Posts

Hi Mohammed,

I guess the patch is available (yet) in trunk, I actually do not know...
You should compare my fix vs. trunk

Regards
Hervé
zaheer mohammed saddapalli
RE: LEP 5.1.2 - Flash & WMV : Journal + Document library : IE
January 27, 2009 12:43 AM
Answer

zaheer mohammed saddapalli

Rank: Regular Member

Posts: 164

Join Date: January 15, 2008

Recent Posts

Hervé Ménage:
Hi Mohammed,

I guess the patch is available (yet) in trunk, I actually do not know...
You should compare my fix vs. trunk

Regards
Hervé



Thank you Herve.

I will do some research and will let you know.
Angelo Immediata
RE: LEP 5.1.2 - Flash & WMV : Journal + Document library : IE
February 3, 2009 4:37 AM
Answer

Angelo Immediata

Rank: Junior Member

Posts: 77

Join Date: June 12, 2006

Recent Posts

Hi Herve.
I need to use your patch for showing some videos by using Liferay.
Here it's what i have done:
  • I have create my model xml file with a field named Video; this field is a document_library type file
  • I have created my structure vm file
  • I have modified the portal-ext as u wrote
  • I modified the 2 classes as u showed

When i go to the page i can see only a great white area; my flv video is not showed.....am i missing anything?
Here it's my vm code (very similar to your one)
1
2<div id="flash_movie">
3   <p>Loading...</p>
4</div>
5<script src="/html/js/flashutils/FlashReplace-1.01.js" type="text/javascript"></script>
6<script type="text/javascript">FlashReplace.replace('flash_movie','$Video.getData()','flashMovie-id',800,600);
7</script>

Any help is appreciated
Thanx to all
Angelo
Hervé Ménage
RE: LEP 5.1.2 - Flash & WMV : Journal + Document library : IE
February 3, 2009 5:09 AM
Answer

Hervé Ménage

Rank: Junior Member

Posts: 50

Join Date: March 1, 2007

Recent Posts

Hi Angelo,

Unfortunately, I have never succeeded in displaying FLV movies.
My patch supports only WMV and SWF files. I tried on FF, IE & Chrome.

sorry...

Regards
Hervé
Angelo Immediata
RE: LEP 5.1.2 - Flash & WMV : Journal + Document library : IE
February 5, 2009 3:00 AM
Answer

Angelo Immediata

Rank: Junior Member

Posts: 77

Join Date: June 12, 2006

Recent Posts

Hi Hervè.
I'm able to show flv video stored in the document libray.
By starting from your post i won. Thank you for your help.
All the infoo are stored in this thread: http://www.liferay.com/web/guest/community/forums/-/message_boards/message/2107094

Thank you.
Angelo
Jorge Ferrer
RE: LEP 5.1.2 - Flash & WMV : Journal + Document library : IE
February 14, 2009 12:06 PM
Answer

Jorge Ferrer

LIFERAY STAFF

Rank: Liferay Legend

Posts: 2768

Join Date: August 31, 2006

Recent Posts

Hi Hervé,

Thanks a lot for suggesting this improvement and even more for providing the solution for it emoticon

For everyone else, the change has been applied and will be part of the next major release (5.3), the next maintenance release of 5.2 and also as a service pack to subscribers to 5.1.