I found more accurate information about the path to
flv file:
this works in preview mode (mediaplayer.swf can find the flv file):
<object width="550" height="400">
<param name="movie"
value="extensions/flashMovie/mediaplayer.swf">
<param flashvars="file='.$this->url.'" />
<embed src="extensions/flashMovie/mediaplayer.swf" width="550"
height="400" flashvars="file='.$this->url.'">
</embed>
</object>
But this doesn't load mediaplayer.swf in article view.
If i remove the "flashvars" from <embed>:
<object width="550" height="400">
<param name="movie"
value="extensions/flashMovie/mediaplayer.swf">
<param name="flashvars" value="file='.$this->url.'"
/>
<embed src="extensions/flashMovie/mediaplayer.swf" width="550"
height="400">
</embed>
</object>
The mediaplayer.swf is loaded in article view, but mediaplayer can't
load the flv file, although there is a param with flashvars.
This mediaplayer is from here:
I don't understand why in article view the code works diferent from
preview mode... what's changing???
On 12/19/07, >Raul< <clinisbut(a)gmail.com> wrote:
Investigating, it seems that mediawiki
doesn't like the form:
<embed src="extensions/flashMovie/mediaplayer.swf" width="400"
height="400" type="application/x-shockwave-flash"
pluginspage="http://www.macromedia.com/go/getflashplayer"
flashvars="file='.$this->url.'" />
For a flash object, instead this:
<object width="425" height="355"><param
name="movie"
value="extensions/flashMovie/mediaplayer.swf"></param><param
name="wmode" value="transparent"></param><param
name="flashvars"
value="file='.$this->url.'"></param><embed
src="extensions/flashMovie/mediaplayer.swf"
type="application/x-shockwave-flash" wmode="transparent"
width="425"
height="355"></embed></object>
...loads ok.
But this way "mediaplayer.swf" can't get to the $this->url path (which
points to a .flv file uploaded into the wiki). Why?!?!?!
On Dec 19, 2007 1:25 PM, >Raul< <clinisbut(a)gmail.com> wrote:
I've edited the extension
http://www.mediawiki.org/wiki/Extension:Flash to
allow post my own uploaded flashes animations.
It works great... but only in preview mode!!!
In the discussion page of this extension someone talks about "the solution
is to correct the current directory assumptions in the Flash code." but I've
tried with flash animations without any actionscript that could take any
current directory assumptions and does not work too.
This is my extension flash version:
class Flash
{
var $tmp;
var $file;
/* Constructor */
function Flash( $input )
{
$this->tmp = '';
Flash::parseInput( $input ); // Parse the input
Flash::genCode(); // Generate the final code
}
/* Parser */
function parseInput( $input )
{
$this->file = $input;
}
/* Generate big, final chunk of code */
function genCode()
{
// Possibly malicious settings:
$allowscriptaccess = 'false'; // allow / disallow scripts
$swliveconnect = 'false'; // start / do not start up java
// Default version Setting:
$this->version = '7,0,0,0'; // Version settings for <object>
$this->url = $this->getTitle( $this->file );//Flash::imageUrl(
$this->file, $this->fromSharedDirectory ); // get Wiki internal url
$this->code = '<div style="border:1px solid;">
<embed src="extensions/flashMovie/quemecorro.swf"
width="400"
height="400"
type="application/x-shockwave-flash" pluginspage="
http://www.macromedia.com/go/getflashplayer" />
</div>';
return $this->code;
}
function getTitle( $file )
{
$title = Title::makeTitleSafe("Image",$file);
$img = new Image( $title );
$path = $img->getViewURL(false);
return $path;
}
}
function wfFlashExtension()
{
global $wgParser;
$wgParser->setHook( "flash", "renderFlash" );
}
function renderFlash( $input )
{
global $code;
// Constructor
$flashFile = new Flash( $input );
$code = $flashFile->code;
return $code; // send the final code to the wiki
}