Keyword

Different dimensions per video

  • amorino
  • amorino's Avatar Topic Author
  • Offline
  • New Member
More
17 years 1 month ago - 15 years 9 months ago #889 by amorino
Different dimensions per video was created by amorino
Hi everybody,
Can i fix the size of the video individually.
I want (for example) to have 2 videos on the same page one 300x400 in the center and one other 180x150 on the left position

is it possible?
Thank you

Please Log in or Create an account to join the conversation.

More
17 years 1 month ago #890 by JoomlaWorks
Replied by JoomlaWorks on topic Re: The size
This feature is coming in v2.5 in April.

Fotis / JoomlaWorks Support Team
---
Please search the forum before posting a new topic :)

Please Log in or Create an account to join the conversation.

  • amorino
  • amorino's Avatar Topic Author
  • Offline
  • New Member
More
17 years 1 month ago #891 by amorino
Replied by amorino on topic Re: The size
Here it's April  :D :P

Please Log in or Create an account to join the conversation.

More
17 years 2 weeks ago #892 by zoroox
Replied by zoroox on topic Re: The size
Here is also April  ;)

We wait for this feature for March as you said in joomla site.

At least I hope it will release that wonderfull mambot with no bugs and well tested !

Please Log in or Create an account to join the conversation.

More
17 years 1 week ago #893 by zoroox
Replied by zoroox on topic Re: The size
Any news for the new release of the 2.5 version?

Please Log in or Create an account to join the conversation.

  • amorino
  • amorino's Avatar Topic Author
  • Offline
  • New Member
More
17 years 1 week ago #894 by amorino
Replied by amorino on topic Re: The size
we are waiting  8)

Please Log in or Create an account to join the conversation.

More
16 years 11 months ago #895 by lucs
Replied by lucs on topic Re: The size
Hi, I had the same problem and I resolved it by modifying the file plugin_jw_allvideos.php under /mambots/content adding this function:
// Group Zero (personal size for local flv videos) eg: {flv-widthxheight}video_flv{/flv}

$_MAMBOTS->registerFunction( 'onPrepareContent', 'AllVideos_personal' );



function AllVideos_personal( $published, &$row, &$params, $page=0 ) {



// add parameters

global $mosConfig_absolute_path, $mosConfig_live_site, $mosConfig_session_type, $mainframe, $database;

  $query = "SELECT id FROM #__mambots WHERE element = 'plugin_jw_allvideos' AND folder = 'content'";

  $database->setQuery( $query );

  $id = $database->loadResult();

  $mambot = new mosMambot( $database );

  $mambot->load( $id );

  $param =& new mosParameters( $mambot->params );  

  $allvideos_css = $param->get('allvideos_css', 'allvideos');

  $top_margin = 'margin-top:'.$param->get('top_margin', 8).'px;';

  $bottom_margin = 'margin-bottom:'.$param->get('bottom_margin', 8).'px;';

  $video_align = 'text-align:'.$param->get('video_align', 'left').';';

  $video_folder = $param->get('video_folder', 'images/stories/videos/');

  $video_transparency = $param->get('video_transparency', 'transparent');

  $video_bg = $param->get('video_bg', '');

  $autostart = '&'.$param->get('autostart', 'autostart=false');

  $audio_folder = $param->get('audio_folder', 'images/stories/audio/');

// end parameters

$out = "<object classid=\"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000\" codebase=\"http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,19,0\" style=\"***misure***\" title=\"AllVideos Player\">

  <param name=\"movie\" value=\"$mosConfig_live_site/mambots/content/plugin_jw_allvideos/jw_allvideos_player.swf?file=$mosConfig_live_site/".$video_folder."***video***.flv&showdigits=true".$autostart."\" />

  <param name=\"quality\" value=\"high\" />

  <param name=\"wmode\" value=\"".$video_transparency."\" />

  <param name=\"bgcolor\" value=\"".$video_bg."\">

  <embed src=\"$mosConfig_live_site/mambots/content/plugin_jw_allvideos/jw_allvideos_player.swf?file=$mosConfig_live_site/".$video_folder."***video***.flv&showdigits=true".$autostart."\" quality=\"high\" pluginspage=\"http://www.macromedia.com/go/getflashplayer\" type=\"application/x-shockwave-flash\" wmode=\"".$video_transparency."\" bgcolor=\"".$video_bg."\" style=\"***misure***\"></embed>

</object>";

$regexp = "#{flv-(.*?)}(.*?){/flv}#s";

// prepend and append code

$startcode = "\n\n<!-- JW AllVideos Plugin (v2.4) starts here -->\n<div style=\"clear:both;".$video_align.$top_margin.$bottom_margin."\" class=\"".$allvideos_css."\">\n";

$endcode = "\n</div>\n<!-- JW AllVideos Plugin (v2.4) ends here -->\n\n";

	if ( !$published ) {		

		$row->text = preg_replace( $regexp, '', $row->text );

		return;

	}
	    if(preg_match_all($regexp, $row->text, $output, PREG_PATTERN_ORDER) > 0){
	    print_r($output);
	    	for($i=0;$i<count($output[0]);$i++){
	    		$match = preg_replace("/{.+?}/", "", $output[0][$i]);
	    		
	    		$misure = explode("x", $output[1][$i]);
	    		$misure_player = 'width:'.$misure[0].'px; height:'.$misure[1].'px;';
	    		$code = str_replace("***misure***", $misure_player, $out);
	    		$code = str_replace("***video***", $match, $code);
	    		$row->text = preg_replace("#{flv-(.*?)}".preg_quote($match)."{/flv}#s", $startcode.$code.$endcode , $row->text );
	    	}
	    }
	    
	    
}

It's not very flexible and works only with local flv files, but you can spcify your desired size for each flv file.
Syntax is:
{flv-widthxheight}flv-video{/flv}

e.g. {flv-320x240}video{/flv}

I hope it could be of some help.

Luca

Please Log in or Create an account to join the conversation.

More
16 years 11 months ago #896 by Zappu
Replied by Zappu on topic Re: The size
Works fine Lucs as long as you do this:

//     print_r($output);

as the array printed within the page does not look so fine :)
nice work and just helped me a lot

Zappu

Zappu<br /> MTW Office

Please Log in or Create an account to join the conversation.

More
16 years 11 months ago #897 by pjburnhill
Replied by pjburnhill on topic Re: The size
Could I use that bit of code to do the same thing for local .mov?

Please Log in or Create an account to join the conversation.

More
16 years 10 months ago #898 by lucs
Replied by lucs on topic Re: The size

Works fine Lucs as long as you do this:

//     print_r($output);

as the array printed within the page does not look so fine :)
nice work and just helped me a lot

Zappu


Ooooops...you're right!! It was only a debug print.
I forgot to comment out that line  :-[

Please Log in or Create an account to join the conversation.


Powered by Kunena Forum