Plugin Directory

Changeset 539298


Ignore:
Timestamp:
05/03/2012 02:54:08 AM (14 years ago)
Author:
nurungji
Message:
 
Location:
hana-flv-player/trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • hana-flv-player/trunk/hana-flv-player.php

    r535930 r539298  
    44Plugin URI: http://wpmarketing.org/plugins/hana-flv-player/
    55Description: 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.2
     6Version: 2.8.3
    77Author: HanaDaddy
    88Author URI: http://neox.net
     
    1616
    1717    var $plugin_folder ='hana-flv-player';
    18     var $version="2.8.2";
     18    var $version="2.8.3";
    1919    var $user_attr ;
    2020    var $update_result='';
     
    497497           
    498498            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
    499502                $output = "<hana-ampersand>
    500503                <style>.mejs-inner img { max-width:100%; max-height:100%; margin:0 ; padding:0 }</style>
     
    509512            $media_id = 'hana_flv_media_' . $this->player_used[$player];
    510513           
    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&amp;file='.$flv_attr['video'].'&amp;preload='.$preload.'&amp;poster='.$flv_attr['splashimage'].'" />       
    524         </object></hana-ampersand>';
    525             */
     514         
    526515            $splashImage='';
    527             $preload='';
     516            $preload='none'; //preload='none' doesn't work with IE9
     517            $autoplay='';
     518           
    528519            if ($flv_attr['splashimage'] != '') {
    529520                $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            }
    538526               
    539527           
    540             $autoplay='';
     528           
    541529            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.'&amp;
     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&amp;file='.$flv_attr['video'].'&amp;poster='.$flv_attr['splashimage'].'" />       
     541        '.$description.'
     542    </object></video></div></hana-ampersand>';
     543           
     544           
    549545            $options="";
    550546            if ($flv_attr['loop'] == 'true') {
     
    568564             
    569565           
    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 });
    572568                    </script></hana-ampersand>";
    573                         
     569             
    574570        }else  {
    575571           
     
    899895This is a sample of HTML5 player with mp4 video file playing
    900896[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"
    903899    player="5"
    904900    autoplay="false"
  • hana-flv-player/trunk/readme.txt

    r535930 r539298  
    55Requires at least: 2.0
    66Tested up to: 3.3.2
    7 Stable tag: 2.8.2
     7Stable tag: 2.8.3
    88
    99Easily embed the Flash Video in your Wordpress featuring Flowplayer(version 2 and 3), OS FLV player, FLV Player Maxi, and MediaElement.js.
     
    139139== Change Log ==
    140140
    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): =
    143146
    144147* 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.
    145148* Minor fixes for MediaElement.js implemenation
    146149
    147 = v2.8.1 (4/22/2012): =
     150= v2.8.1 (04/22/2012): =
    148151
    149152* '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.
    150153
    151 = v2.8 (4/17/2012): =
     154= v2.8 (04/17/2012): =
    152155
    153156* 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.