Configuration for Hana Flv Player Vversion; ?>
check_if_maxi_exist()) : ?>
NOTE: Starting from V2.7.1 ,
FLV Player Maxi is no longer included by default because it is licensed under non GPL compatible licenses
(
CC,
MPL 1.1).
But you can still
download (or
here)
and unzip it manually under your Hana FLV Player plugin path (
).
So
must exist.
If not, Flow Player 3 will be used instead.
Now you can easily embed the FLV Flash videos in your WordPress Blog.
I have packaged the two FLV Flash players -
OS FLV (GPL),
FlowPlayer (GPL), and
MediaElement.js HTML5 player to support HTML5 players including Apple devices. So you can use them freely without worries even for the commercial purpose unlike the JW player.
( You can also use
FLV Player Maxi , but it is no longer included by default because it is licensed under non GPL compatible licenses. )
You can place a specific tag element [hana-flv-player] in the article where you want to show. The 'video' attribute is mandatory. There are other optional attributes.
Default values for the options can be defined in this pages. See the bottom of the page for the example.
Now it's Search Engine Friendly. Use the 'description' attribute to leave details about the video. Search engines is able to read them now.
Use either FLV or H.264 encoded MP4 video files. More information about how to convert video encodings
Usage Example:
There is a tinymce or quicktag button that you can directly use , but here is the full usage example.
[hana-flv-player
video="plugin_url; ?>/babyhana.flv"
width="400"
height="320"
description="Sarah is having fun in a merry-go-round"
clickurl=""
clicktarget="_blank"
player="4"
autoplay="false"
loop="false"
autorewind="true"
splashimage="plugin_url; ?>/splash.jpg"
/]
Another sample of auto height
[hana-flv-player
video="plugin_url; ?>/sarah.flv"
width="350"
height=""
description="Sarah is having fun at the beach"
player="4"
/]
This is a sample of HTML5 player with mp4 video file playing
[hana-flv-player
video="plugin_url; ?>/hana_sleding.mp4"
description="Hana is having fun while sleding"
player="5"
autoplay="false"
autoload="true"
loop="true"
/]
When you defined any attribute, please make sure that you use single or double quotes around the attribute value, or my plugin may not recognize the attribute.
Attributes explained:
- video: URL of the flv video file. This is mandatory.
- width: Width of the Flash player.
- height: Height of the Flash player. If not defined, automatically calculated using 4:3 ratio. If 16:9 ratio is needed, use 'autow' as height.
- description: Description of the video. This will be shown when
the_excerpt() is used. Also it is used within the SWF objects or javascripts, so search engines can read it.
- clickurl: If you want to open a website when a user clicks on the video, you can define the target website URL here.
- clicktarget: The target of the URL when clicking on the video. Same window:
_self, New window _blank
- player: If set to "1" , OS FLV will be used.
If set to "2", FlowPlayer will be used.
"3" is for FLV Player Maxi.
"4" is for FlowPlayer 3(3.2.3).
"5" is for MediaElement.js HTML5 player.
- autoload: If true, the movie will be loaded (downloaded). If false, the starting screen will be blank since no video is downloaded.
- autoplay: If true, the movie will play automatically when the page is loaded.
- loop: If Loop is true, the movie will replay itself constantly.
- autorewind: If AutoRewind is true, the cursor will be reset to the start of the movie when the movie is ended.
- splashimage: Only works with FlowPlayer and FLV player Maxi. When autoload is off, this splash image will be shown in the player. It only supports JPEG images.
- more_2: more options for the Flow Player v2.
- more_3: more options for the Flv Player.
- more_4: more options for the Flow Player v3.
Insert flv into template theme files (such as sidebar.php)
Okay, here is the function that you can use in the theme template files to show FLV movie. Basically you need to
use
hana_flv_player_template_call method. The method takes a single argument.
The argument should be just the string of the attributes of usage explained the above. Just copy below code into your
theme file and edit red colored attributes accordingly.
<?php
if (function_exists('hana_flv_player_template_call')){
$hana_arg="
video='plugin_url; ?>/babyhana.flv'
player='2'
width='180'
height='150'
more_2=\"showStopButton: false, showScrubber: false, showVolumeSlider: false,showMuteVolumeButton: false,
showFullScreenButton: false, showMenu: false, controlsOverVideo: 'locked',controlBarBackgroundColor: -1,
controlBarGloss: 'none', usePlayOverlay:false \"
";
echo hana_flv_player_template_call($hana_arg);
}
?>
Note: Be careful when you use other website's video file as rthe video source. Since video files are usually large is size they can use up the bandwidth quickly.
So you should ask for the owner's permission before using that link to the file.
Thank you for using my plugin. - HanaDaddy
Please support Hana Flv Player by shopping at Amazon.com from this search box. Thank you!
user_attr['player'] = $_POST['hflv_player'];
}
}
if ( isset($_POST['hflv_width']) ) {
if ( is_numeric($_POST['hflv_width']) )
$this->user_attr['width'] = $_POST['hflv_width'];
}
if ( isset($_POST['hflv_height']) ) {
if ( $_POST['hflv_height']=='' || is_numeric($_POST['hflv_height']) || $_POST['hflv_height']=='auto' || $_POST['hflv_height']=='autow' )
$this->user_attr['height'] = $_POST['hflv_height'];
}
if ( isset($_POST['hflv_autoplay']) ) {
if ($_POST['hflv_autoplay'] =='true' || $_POST['hflv_autoplay'] =='false' )
$this->user_attr['autoplay'] = $_POST['hflv_autoplay'];
}
if ( isset($_POST['hflv_loop']) ) {
if ($_POST['hflv_loop'] =='true' || $_POST['hflv_loop'] =='false' )
$this->user_attr['loop'] = $_POST['hflv_loop'];
}
if ( isset($_POST['hflv_autorewind']) ) {
if ($_POST['hflv_autorewind'] =='true' || $_POST['hflv_autorewind'] =='false' )
$this->user_attr['autorewind'] = $_POST['hflv_autorewind'];
}
if ( isset($_POST['hflv_autoload']) ) {
if ($_POST['hflv_autoload'] =='true' || $_POST['hflv_autoload'] =='false' )
$this->user_attr['autoload'] = $_POST['hflv_autoload'];
}
if ( isset($_POST['hflv_event_tracking']) ) {
if ($_POST['hflv_event_tracking'] =='yes' || $_POST[hflv_event_tracking] =='no' )
$this->user_attr['event_tracking'] = $_POST['hflv_event_tracking'];
}
if ( isset($_POST['hflv_more_2']) ) {
$this->user_attr['more_2'] = str_replace("\\",'',$_POST['hflv_more_2']);
}
if ( isset($_POST['hflv_more_3']) ) {
$this->user_attr['more_3'] = str_replace("\\",'',$_POST['hflv_more_3']);
}
if ( isset($_POST['hflv_more_4']) ) {
$this->user_attr['more_4'] = str_replace("\\",'',$_POST['hflv_more_4']);
}
if ( isset($_POST['hflv_more_4']) ) {
$this->user_attr['flow3key'] = str_replace("\\",'',$_POST['flow3key']);
}
if ( isset($_POST['hflv_more_5']) ) {
$this->user_attr['more_5'] = str_replace("\\",'',$_POST['hflv_more_5']);
}
//print_r ($this->user_attr);
update_option('hanaflv_options',$this->user_attr);
//$this->user_attr = get_option('hanaflv_options');
$this->update_result="Settings are updated";
}
//Support function-----------------------------------------------------
function parse_attributes($attrib_string){
//first str_replace \n => ' '
// new line are already stored as