You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@lenya.apache.org by stevecam <st...@geometryit.com> on 2007/11/21 07:59:51 UTC
problems using flash video with Lenya
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:
TLP/authoring/INDIVIDUAL/IDV-ABOUT-TL/MARITIME-SECTOR/Corona_Skin_3.swf
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#a13872148
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
Re: problems using flash video with Lenya
Posted by stevecam <st...@geometryit.com>.
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" />
</map:match>
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:choose>
<xsl:when test="@href != ''">
{@href}
<xsl:call-template name="object2img"/>
</xsl:when>
<xsl:when test="@type = 'application/x-shockwave-flash'">
<div id="flashcontent">
<strong>You need to install or upgrade your Flash Player</strong>
</div>
<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("salign","lt");
so.addParam("quality", "high" );
so.addParam("scale","noscale");
so.addVariable("MM_ComponentVersion","1");
so.addVariable("skinName", "<xsl:value-of
select="$nodeid"/>/Corona_Skin_3");
so.addVariable("streamName","maritime_beta01");
so.addVariable("autoPlay","true");
so.addVariable("autoRewind","true");
so.write("flashcontent");
</script>
</xsl:when>
<xsl:otherwise>
<xsl:call-template name="object2img"/>
</xsl:otherwise>
</xsl:choose>
</xsl:template>
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:
<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"
codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0"
width="400" height="320" id="FLVPlayer">
<param name="movie"
value="{$nodeid}/FLVPlayer_Progressive.swf" />
<param name="salign" value="lt" />
<param name="quality" value="high" />
<param name="scale" value="noscale" />
<param name="FlashVars"
value="%26MM_ComponentVersion=1%26skinName={$nodeid}/Corona_Skin_3%26streamName=maritime_beta01%26autoPlay=true%26autoRewind=true"
/>
<embed src="{$nodeid}/FLVPlayer_Progressive.swf"
flashvars="%26MM_ComponentVersion=1%26skinName={$nodeid}/Corona_Skin_3%26streamName=maritime_beta01%26autoPlay=true%26autoRewind=true"
quality="high" scale="noscale" width="400" height="320" name="FLVPlayer"
salign="LT" type="application/x-shockwave-flash"
pluginspage="http://www.macromedia.com/go/getflashplayer" />
</object>
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:
> TLP/authoring/INDIVIDUAL/IDV-ABOUT-TL/MARITIME-SECTOR/Corona_Skin_3.swf
>
> 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