Quick install steps
Click here to download a user documentation of our plugin : SVP Plugin User Documentation (in french).Plugin installation and activation
- Install a WordPress 2.9+ version (successfully tested with WordPress 3.0.2)
- Download and install SVP plugin 1.4.2 :
- Get the zip file here : SVP Plugin 1.4.2 Zip File or in Downloads page
- Unzip the files
- Just place the svp-silverlight directory in your WordPress plugins directory
- Go to WordPress administration and activate SVP plugin
Smooth Streaming videos encoding and hosting
Your WordPress blog can be installed on a LAMP server, but the Smooth Streaming videos must be hosted on a IIS 7.0 server.- Encode your videos with Microsoft Expression Encoder (for example) 3.0 or 4.0 version (choose a H.264 encoding)
- Host your Smooth Streaming videos encoded on a IIS 7.0 server (be ensure you have IIS Media Services correctly installed and configured)
- Place movies.aspx file (in svp-silverlight root directory of your downloaded zip file) in the web root of your Smooth Streaming videos server. This file goes to expose a XML feed used by SVP plugin to get the Smooth Streaming videos list.
IIS 7.0 Media Services installed
movies.aspx placed in videos server web root
Main plugin configuration
- Configure URL of your Smooth Streaming videos server (Windows Server with IIS 7.0 is required)
- Indicate the name directory where Smooth Streaming videos are hosted on the Smooth Streaming videos server
- Configure the default width and height of the SMF 2.2 player
- Indicate the items count for the Media RSS publication of latest Smooth Streaming Videos linked to posts blog
- Don't forget to click Save changes button
Link Smooth Streaming Video to a post blog
- Go to WordPress administration and edit a post
- At the bottom of the page, simply choose inside the left list the Smooth Streaming video you want to link to your post. It's an Ajax action, don't click on Save button.
- You can override the default width and height of the player updating the width and height input values. In this case, you have to click on Save button.
Show the video player
We have developped a WordPress Template Tag to permit to show the Smooth Streaming Player in your post page. Follow these next steps to show this player :- Open your activated WordPress theme directory
- Open your single.php file (it's the template file showing your detailed post data in your WordPress blog) in a editor file
- Add the minimum following line (ie after the <div class="navigation">, inside the <div id="content">) :
- You can pass some parameters to this WordPress Template Tag :
- Width : to override the default width or specific width of the player (can be an integer or a percent, '100%' for example, empty by default)
- Height : to override the default height or specific height of the player (can be an integer or a percent, empty by default)
- Comments : a boolean to indicate if some comments must be written in the HTML source code before and after the player HTML source code (true by default)
- Container : a boolean to indicate if a identified <div> container must be written in the HTML source code (true by default)
- Before : some HTML source code to add before player HTML source code (empty by default)
- After : some HTML source code to add after player HTML source code (empty by default)
- Example of a player with a 100% parent width :
You can also call a hook to add custom functionnality. In fact, our Template Tag expose a hook at the end of his execution. This hook name is show_smooth_video_player.
You have an example of use of this hook inside your downloaded zip file in the default theme directory.
For your only eyes, we have just added a sample code of this use :
<?php function lct_video_legend($id) { print '<style type="text/css"> .lct-legend { border-top: 1px dotted #c00; margin-top: 5px; font-size: .9em; color: #c00; font-family: Arial, Helvetica, Sans-Serif; } .lct-legend p { margin: 0; padding: 0; } </style> <div class="lct-legend"><p>'; printf (__("A sample legend for post ID %u", "svp-translate"), (int)$id); print '</p></div>'; } add_action("show_smooth_video_player", "lct_video_legend"); the_smooth_video_player('100%'); ?>
As you can see, to call the hook execution, just add a add_action() WordPress function with the hook name as first parameter and your specific callback function name as second parameter.
Your specific callback function takes post ID as unique parameter. You can use it if you want get some datas about it.