Quantcast
Channel: smooth Wiki Rss Feed
Viewing all articles
Browse latest Browse all 20

Updated Wiki: Documentation

$
0
0

Quick install steps

Click here to download a user documentation of our plugin : SVP Plugin User Documentation (in french).

Plugin installation and activation

  1. Install a WordPress 2.9+ version (successfully tested with a 3.0 version of WordPress)
  2. Download and install SVP plugin 1.4.0 :
    1. Get the zip file here : SVP Plugin 1.4.0 Zip File or in Downloads page
    2. Unzip the files
    3. Just place the svp-silverlight directory in your WordPress plugins directory
    4. Go to WordPress administration and activate SVP plugin
171039

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.
  1. Encode your videos with Microsoft Expression Encoder (for example) 3.0 or 4.0 version (choose a H.264 encoding)
  2. Host your Smooth Streaming videos encoded on a IIS 7.0 server (be ensure you have IIS Media Services correctly installed and configured)
  3. 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.
159254
IIS 7.0 Media Services installed

159256
movies.aspx placed in videos server web root

Main plugin configuration

  1. Configure URL of your Smooth Streaming videos server (Windows Server with IIS 7.0 is required)
  2. Indicate the name directory where Smooth Streaming videos are hosted on the Smooth Streaming videos server
  3. Configure the default width and height of the SMF 2.2 player
  4. Indicate the items count for the Media RSS publication of latest Smooth Streaming Videos linked to posts blog
  5. Don't forget to click Save changes button
159803

Link Smooth Streaming Video to a post blog

  1. Go to WordPress administration and edit a post
  2. 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.
  3. 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.
159253

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 :
  1. Open your activated WordPress theme directory
  2. Open your single.php file (it's the template file showing your detailed post data in your WordPress blog) in a editor file
  3. Add the minimum following line (ie after the <div class="navigation">, inside the <div id="content">) :
the_smooth_video_player();
  1. You can pass some parameters to this WordPress Template Tag :
    1. 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)
    2. Height : to override the default height or specific height of the player (can be an integer or a percent, empty by default)
    3. 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)
    4. Container : a boolean to indicate if a identified <div> container must be written in the HTML source code (true by default)
    5. Before : some HTML source code to add before player HTML source code (empty by default)
    6. After : some HTML source code to add after player HTML source code (empty by default)
    7. Example of a player with a 100% parent width :
the_smooth_video_player('100%');

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.

And the result is...

159260

Viewing all articles
Browse latest Browse all 20

Trending Articles