lenya-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From stevecam <stephen.came...@geometryit.com>
Subject Re: problems using flash video with Lenya
Date Thu, 22 Nov 2007 02:04:25 GMT

Part solved! (Note: my previous post added the flash plugin to the Forum
message so scroll down to see it all)

Add the following lines to lenya/resources.xmap:

          <map:match pattern="*/*/**.flv">
            <map:read src="pubs/{1}/resources/{2}/{3}.flv"
mime-type="video/x-flv" />

Then, if all files (.swf and .flv) are uploaded as assets and if I change
xhtml2xhtml.xsl as below:

  <xsl:template match="xhtml:object" priority="3">
      <xsl:when test="@href != ''">
          <xsl:call-template name="object2img"/>
      <xsl:when test="@type = 'application/x-shockwave-flash'">

	<div id="flashcontent">
		<strong>You need to install or upgrade your Flash Player</strong>

	<script type="text/javascript">

var so = new SWFObject("<xsl:value-of
select="$nodeid"/>/FLVPlayer_Progressive.swf", "objflash", "<xsl:value-of
select="@width"/>", "<xsl:value-of select="@height"/>", "8.0.0", "#FF6600");
            so.addParam("quality", "high" );
		so.addVariable("skinName", "<xsl:value-of


        <xsl:call-template name="object2img"/>

Also, after adding a line to reference the external SWFObject javascript
code file in page2html.xsl, I have a solution that works.

I also found that i needed to configure Tomcat to allow large files to be
served by adding an environment variable:  CATALINA_OPTS=-Xms256M -Xmx512M.

The non-javascript version, as below, doesn't work:

&lt;object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"
width="400" height="320" id="FLVPlayer"&gt;
            &lt;param name="movie"
value="{$nodeid}/FLVPlayer_Progressive.swf" /&gt;
            &lt;param name="salign" value="lt" /&gt;
            &lt;param name="quality" value="high" /&gt;
            &lt;param name="scale" value="noscale" /&gt;
            &lt;param name="FlashVars"
            &lt;embed src="{$nodeid}/FLVPlayer_Progressive.swf"
quality="high" scale="noscale" width="400" height="320" name="FLVPlayer"
salign="LT" type="application/x-shockwave-flash"
pluginspage="http://www.macromedia.com/go/getflashplayer" /&gt;         

I presume this is because the FlashVars param is not understood with %26
encoding &.

stevecam wrote:
> I am currently attempting to add a Flash video to an HTML page serverd by
> Lenya and am having problems.
> I am taking a working version of a page provided by the flash content
> developer, this has the following code:
> <script src="Scripts/AC_RunActiveContent.js"
> type="text/javascript"></script>
> .
> .
> .
> <script type="text/javascript">
> AC_FL_RunContent(
> 'codebase','http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0','width','400','height','320','id','FLVPlayer','src','FLVPlayer_Progressive','flashvars','&MM_ComponentVersion=1&skinName=Corona_Skin_3&streamName=aviation&autoPlay=true&autoRewind=true','quality','high','scale','noscale','name','FLVPlayer','salign','lt','pluginspage','http://www.macromedia.com/go/getflashplayer','movie','FLVPlayer_Progressive'
> ); //end AC code
> </script>
> <noscript>
> </noscript>
> I tried to make use of this code, the 'AC_FL_RunContent' javascript
> function is provided by Adobe and adds the flash viewer object to the page
> dynamically. I had an problem in Lenya using this method as the string
> "&MM_ComponentVersion=1&skinName=Corona_Skin_3&streamName=aviation&autoPlay=true&autoRewind=true"

> could not be parsed due to the presence of the & characters.
> In looking for a means to get around this issue I found the SWFObject
> javascript object by Geoff Stearns at
> http://blog.deconcept.com/swfobject/. This gave me an alternate means of
> achieving the same thing as   'AC_FL_RunContent' but a bit more readable
> and with the FlashVars string broken up. However, I still have the same
> problem, no video plays. It seems that the FLVPlayer_Progressive.swf file
> is downloaded from the Lenya server but the video (streamName=aviation)
> and skin (skinName=Corona_Skin_3) cannot be obtained by the player.
> I have a simple test script that works when all files can be accessed
> locally, as below: 
> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
> "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
> <html xmlns="http://www.w3.org/1999/xhtml">
> <head>
>   <script src="swfobject.js" type="text/javascript"> </script>
> </head>
> <body>
> <div id="flashcontent"/> 
> <script type="text/javascript">
>    var so = new SWFObject("FLVPlayer_Progressive.swf", "objflash", "400",
> "320", "8", "#FF6600");
> 		so.addVariable("MM_ComponentVersion","1");
> 		so.addVariable("skinName","Corona_Skin_3");
> 		so.addVariable("streamName","Aviation");
> 		so.addVariable("autoPlay","true");
> 		so.addVariable("autoRewind","true");
> 		so.write("flashcontent");
> </script>
> </body>
> </html>
> changing the location of "FLVPlayer_Progressive.swf" to be
> "http://localhost:8082/lenya/TLP/authoring/INDIVIDUAL/IDV-ABOUT-TL/AVIATION-SECTOR/FLVPlayer_Progressive.swf"

> results in that file being downloaded to the browser, so I suspect that
> the problem is accessing the skin and stream files from the server but
> making these static links does not work either, ie:
> so.addVariable("skinName","http://localhost:8082/lenya/TLP/authoring/INDIVIDUAL/IDV-ABOUT-TL/MARITIME-SECTOR/Corona_Skin_3.swf");
> so.addVariable("streamName","http://localhost:8082/lenya/TLP/authoring/INDIVIDUAL/IDV-ABOUT-TL/MARITIME-SECTOR/Aviation.flv");
> In looking at the Lenya log I've just now seen that my diagnosis is
> correct:
> 106695048 2007-11-21 17:46:01,324 [http-8082-Processor22] ERROR
> sitemap.handled-errors.prepareErrorHandler():167  - No pipeline matched
> request:
> Should have thought to look there earlier!!!
> What do I need to add to the Lenya sitemap, any suggestions?

View this message in context: http://www.nabble.com/problems-using-flash-video-with-Lenya-tf4848463.html#a13889758
Sent from the Lenya - Users mailing list archive at Nabble.com.

To unsubscribe, e-mail: user-unsubscribe@lenya.apache.org
For additional commands, e-mail: user-help@lenya.apache.org

View raw message