poorvida wrote:
OK so i dug around in the code for denvideo, and it seems entirely possible to me.
I also found this in the readme, talking about JW player:
Note to 3.xx users: a LOT has changed in the 4.0 release, including changes to flashvars!
I dont know enough about PHP to know for sure, but look at this.
This determines what parameters were typed in, so that it knows what to assign, and what to leave default
// Regular Expression
$regex = '/\{denvideo(.*?)}/i';
$total = preg_match_all( $regex, $row->text, $matches );
if ( !$total ){
return false;
}
// PARAMs
$plgParams =& getDenVideoParams();
// Default
$w = (int)$plgParams->get('width', 400);
$h = (int)$plgParams->get('height', 0 );
$ast = (int)$plgParams->get('autostart', 0 );
// Loop
for( $x=0; $x < $total; $x++ ){
// General Params
$parts = explode( ' ', trim($matches[1][$x]) );
// Default Vaues
$width = $w;
$height = ($h > 0)? $h : ($width * 0.7);
$autostart = $ast;
// Params
$pcount = count($parts);
/**Width*/
if($pcount > 1){
($parts[1] > 0) // if true
&& $width = (int)$parts[1];
$height = $width * 0.7;
/**Height*/
if($pcount > 2){
($parts[2] > 0) // if true
&& ($height = (int)$parts[2]);
($parts[1] > 0) // if false
|| $width = $height * 1.3;
/**autoStart*/
if($pcount > 3){
$autostart = (boolean)$parts[3];
}
}
}
// Video Display
$video = $parts[0];
$video = (strpos($video, 'http://')!==false)?
$video:
$plgParams->get('path_img').$video;
// Put Video inside the content
$replace = showDenVideo( $video, $width, $height, $autostart );
$replace = '<span id="denvideo_'. $x .'" class="denvideo" style="position:relative">'
. $replace
. '<a href="http://www.3den.org/" class="small"
style="display:none; position:absolute; top:1px; left: 1px">Powered by 3DEN</a>'
. '</span>' ;
$row->text = str_replace( $matches[0][$x], $replace, $row->text );
}
return true;
}
This is the part that kicks off the program if the file to be embedded is a swf:
/* Flash .SWF
*****************************************************/
case '.swf':
$replace = addMediaSWF($video, $width, $height);
break;
it seems to me that the loop could be made to look for a few more spots that can hold parameters, and the swf replace could be made to look for them, and pass them along.
OR MAYBE just modify it to hold one extra parameter, and pass the entire flashVars string along in it, like:
{denvideo URLto.swf 300 315 1 flashVars="fp_root_url=http://poorvida.com/FLAM/&ovr_color=0x75855C&ovr_langage=en&ovr_playlist=mc+astro&ovr_author=all&ovr_order=date_music&ovr_order_direction=DESC&ovr_autoplay=1&ovr_loop_playlist=1&ovr_loop_tracks=0&ovr_shuffle=0"}
am i wrong?
what does the optional param string $p do?
* Add SWF media
*
* @return embed tag
* @param string $video url
* @param string $width [optional]
* @param string $height [optional]
* @param string $p [optional]
Hello friend,
You are absolutily right!
We can add more params as you as say, the only reason why we dont do it is because it can make the plugin harder to use, not all user have as mutch knowledge as you and for then flashVars="fp_root_url=http://poorvida.com/FLAM/&ovr_color=0x75855C&ovr_langage=en&ovr_playlist=mc+astro&ovr_author=all&ovr_order=date_music&ovr_order_direction=DESC&ovr_autoplay=1&ovr_loop_playlist=1&ovr_loop_tracks=0&ovr_shuffle=0" this is somethig very crazy,
As I saw you already undestend how denvideo works, and can also add your FLAM player to denVideo as you saw the display loop can show different players for the same format.
What you need to do is create a function showPlaylis(... );
As much playlists canme in XML you can create a
/** on the show begins loop **/
// playlist
case '.xml':
showPlaylis(... );// call your function
break;
JW also can use playlist you can thake a look at their sites