Changeset 539298
- Timestamp:
- 05/03/2012 02:54:08 AM (14 years ago)
- Location:
- hana-flv-player/trunk
- Files:
-
- 2 edited
-
hana-flv-player.php (modified) (6 diffs)
-
readme.txt (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
hana-flv-player/trunk/hana-flv-player.php
r535930 r539298 4 4 Plugin URI: http://wpmarketing.org/plugins/hana-flv-player/ 5 5 Description: The best way to embed Flash Player and Flash movie in your Wordpress Blog. Includes GPL Flowplayer, OS FLV player, and MediaElement.js. Usage: <code>[hana-flv-player video='/source_video.flv' /]</code> 6 Version: 2.8. 26 Version: 2.8.3 7 7 Author: HanaDaddy 8 8 Author URI: http://neox.net … … 16 16 17 17 var $plugin_folder ='hana-flv-player'; 18 var $version="2.8. 2";18 var $version="2.8.3"; 19 19 var $user_attr ; 20 20 var $update_result=''; … … 497 497 498 498 if ($this->player_used[$player] == 0 ) { 499 //wp_enqueue_script("mediaelementjs-scripts", $this->plugin_url."/".$this->player_base[$player]."/build/mediaelement-and-player.min.js", array('jquery'), "2.7.0", false); 500 //wp_enqueue_style("mediaelementjs-styles", $this->plugin_url."/".$this->player_base[$player]."/build/mediaelementplayer.css"); 501 499 502 $output = "<hana-ampersand> 500 503 <style>.mejs-inner img { max-width:100%; max-height:100%; margin:0 ; padding:0 }</style> … … 509 512 $media_id = 'hana_flv_media_' . $this->player_used[$player]; 510 513 511 /*$preload=''; 512 if ($flv_attr['splashimage'] != '') { 513 $preload="none"; 514 } 515 if ($flv_attr['autoload'] != 'true') { 516 $preload="none"; 517 } 518 519 $output=' 520 <hana-ampersand><object width="'.$flv_attr['width'].'" height="'.$flv_attr['height'].'" type="application/x-shockwave-flash" 521 data="'.$this->plugin_url."/".$this->player_base[$player].'/build/flashmediaelement.swf"> 522 <param name="movie" value="'.$this->plugin_url."/".$this->player_base[$player].'/build/flashmediaelement.swf" /> 523 <param name="flashvars" value="controls=true&file='.$flv_attr['video'].'&preload='.$preload.'&poster='.$flv_attr['splashimage'].'" /> 524 </object></hana-ampersand>'; 525 */ 514 526 515 $splashImage=''; 527 $preload=''; 516 $preload='none'; //preload='none' doesn't work with IE9 517 $autoplay=''; 518 528 519 if ($flv_attr['splashimage'] != '') { 529 520 $splashImage="poster='".$flv_attr['splashimage']."'"; 530 $preload="preload='none'"; 531 } 532 533 if ($flv_attr['autoload'] != 'true') { 534 $preload="preload='none'"; 535 } 536 else 537 $preload="preload='true'"; 521 } 522 523 if ($flv_attr['autoload'] == 'true') { 524 $preload='true'; 525 } 538 526 539 527 540 $autoplay='';528 541 529 if ($flv_attr['autoplay'] =='true' ){ 542 $autoplay='autoplay="true"'; 543 } 544 545 $output.="<hana-ampersand><div style='padding:0;margin:0; border:0;'><video id='$media_id' width='".$flv_attr['width']."' height='".$flv_attr['height']."' $splashImage src='".$flv_attr['video']."' 546 $preload $autoplay controls='controls'>$description</video></div></hana-ampersand>"; 547 548 530 $autoplay='autoplay="true"'; //when "autoplay" attribute name is used, it is autoplayed 531 $preload='none'; //In firefox, preload should be 'none' to execute autoplay . that's strange 532 } 533 534 535 //preload='.$preload.'& 536 $output.="<hana-ampersand><div style='padding:0;margin:0; border:0;'><video id='$media_id' controls='controls' src='".$flv_attr['video']."' width='".$flv_attr['width']."' height='".$flv_attr['height']."' $splashImage 537 preload='$preload' $autoplay >".' 538 <object width="'.$flv_attr['width'].'" height="'.$flv_attr['height'].'" type="application/x-shockwave-flash" data="'.$this->plugin_url."/".$this->player_base[$player].'/build/flashmediaelement.swf"> 539 <param name="movie" value="'.$this->plugin_url."/".$this->player_base[$player].'/build/flashmediaelement.swf" /> 540 <param name="flashvars" value="controls=true&file='.$flv_attr['video'].'&poster='.$flv_attr['splashimage'].'" /> 541 '.$description.' 542 </object></video></div></hana-ampersand>'; 543 544 549 545 $options=""; 550 546 if ($flv_attr['loop'] == 'true') { … … 568 564 569 565 570 $output.="<hana-ampersand><script type='text/javascript'>571 jQuery('#".$media_id."').mediaelementplayer({ $options });566 $output.="<hana-ampersand><script type='text/javascript'> 567 jQuery('#".$media_id."').mediaelementplayer({ $options }); 572 568 </script></hana-ampersand>"; 573 569 574 570 }else { 575 571 … … 899 895 This is a sample of HTML5 player with mp4 video file playing 900 896 [hana-flv-player 901 video=" http://localhost/wp/wp-content/plugins/hana-flv-player/hana_sleding.mp4"902 description=" Sarah is having fun in a merry-go-round"897 video="<?php print $this->plugin_url; ?>/hana_sleding.mp4" 898 description="Hana is having fun while sleding" 903 899 player="5" 904 900 autoplay="false" -
hana-flv-player/trunk/readme.txt
r535930 r539298 5 5 Requires at least: 2.0 6 6 Tested up to: 3.3.2 7 Stable tag: 2.8. 27 Stable tag: 2.8.3 8 8 9 9 Easily embed the Flash Video in your Wordpress featuring Flowplayer(version 2 and 3), OS FLV player, FLV Player Maxi, and MediaElement.js. … … 139 139 == Change Log == 140 140 141 142 = v2.8.2 (4/24/2012): = 141 = v2.8.3 (05/02/2012): = 142 143 * For MediaElement.js player, few bugs related to preload and autoplay features are fixed. But it still is unstable compared to flash video player due to different HTML5 video implementation of each browser. 144 145 = v2.8.2 (04/24/2012): = 143 146 144 147 * If Flash video player is used and Apple device is used to view the website, gray square box shows up to indicate the Flash is not supported. 145 148 * Minor fixes for MediaElement.js implemenation 146 149 147 = v2.8.1 ( 4/22/2012): =150 = v2.8.1 (04/22/2012): = 148 151 149 152 * 'Automatic fallback feature to MediaElement.js for Apple devices' feature is disabled due to the problem when any Wordpress cache plugin is used. Since the detection is done within the PHP side, if cache is used, the detection won't work properly. But you can just set to use MediaElement as the player to support Apple devices. 150 153 151 = v2.8 ( 4/17/2012): =154 = v2.8 (04/17/2012): = 152 155 153 156 * Added MediaElement.js v2.8.0 (HTML5 player). I think this is the best HTML5 players out there with flash fallback and Appple device support. However, 'clickurl' attribute is not supported for this player. It does not have the feature yet.
Note: See TracChangeset
for help on using the changeset viewer.