Client Login

Email Address

Password

Remember Me

More services

More information

Legal documents

Knowledgebase

You are here: Home > Knowledgebase > Can I utilize flash streaming from within Site Workbench?

Can I utilize flash streaming from within Site Workbench?

Site Workbench is intended for regular website hosting, and is for customers who are unfamiliar with designing a website. Its purpose is to allow one to quickly and easily build a website from a selection of over 500 available templates.

Our new flash streaming service is geared toward those who have experience with website development. To properly utilize flash on-demand and/or live streaming, you will have to embed a flash player within your website, and to truly make it easy to maintain, you will have to do it in such a way that you can re-use a single player page to stream multiple media files.

So, strictly speaking, it is not necessarily recommended to combine Site Workbench with our flash streaming service. However, since we have received requests for help with this, this article is provided to help you get started if you really want to build your site with Site Workbench AND use flash streaming.

The first step in this process is uploading your flash media files. Unfortunately, you will not be able to perform this step from within Site Workbench.

Your best bet will be to use FTP (file transfer protocol). Your flash streaming instructions provided you with the ftp server, username and password information necessary to connect to your hosting via FTP. We also have several FTP tutorials which may help you get started using FTP.

Your flash streaming instructions also document how to use the on-demand streaming. As stated there, you'll need to upload your media files to the proper location - public_html/flash_media

Once you have some media files uploaded, the next step will be creating a player page in Site Workbench. This will be a single page with an embedded player, which you can call from other pages of your website, passing in the media file name on the URL so that the one player page can be used throughout your site for playing various flash media files.

When we provision flash streaming, we roll out a flash player called FlowPlayer to your flash site. However, before late 2009 we used a different player, the Sonettic Cinema player. For that reason, some users may need to make sure they have the files required for FlowPlayer. Those files are:

flowplayer-3.1.4.min.js
flowplayer-3.1.5.swf
flowplayer.controls-3.1.5.swf
flowplayer.rtmp-3.1.3.swf

Chances are if you ordered flash streaming after October 2009, these files are already present on your site. If these files are not present in the public_html folder of your site, they will need to be uploaded. You can download the files from the Downloads area of our website.

To create the player page, first visit the Pages section of Site Workbench, check the box to the left of "Common Page" under "Special pages", and add the page to your site by clicking the > button to the right of "Special pages". This will add a page named "Commaon page" to your site.

To edit the page, go to the Edit section, and click "Common Page" in the "Site map" area.

Change the page title to anything you like, but enter "player" (without the quotes) as the Page file name. Fill out the page keywords and description as you wish, if at all.

Uncheck the "Show this page in site map" option, as we won't want visitors going directly to this page - it will be called from other pages with specific URLs to direct the player page as to which file should be played.

Now it's time to move on to the page content. To embed the flash player requires some javascript code and some custom html code. To incorporate those elements we have to drag and drop the Script icon from the Modules area on the right side of the page, to the content area of the player page we are editing.

We need two of those Script modules on the page, one for the javascript, and one for the html code we need which will go where the player is to be placed.

So, drag and drop the Script icon onto the page, then click the Properties link that will appear on the module in the page. Replace the default text with the following:

<script type="text/javascript" src="flowplayer-3.1.4.min.js"></script>
<script>
flowplayer("player", "flowplayer-3.1.5.swf", {

clip: {
url: '<?php echo $mediafile; ?>',
provider: 'influxis'
},

// streaming plugins are configured under the plugins node
plugins: {

influxis: {
url: 'flowplayer.rtmp-3.1.3.swf',

netConnectionUrl:
'rtmp://domain.com/archive'
}
}
});
</script>

You will need to replace the highlighted domain.com in rtmp://domain.com/archive above with the domain name of your flash streaming plan.

The other highlighted portion of the above code is what will allow us to specify the media file on the URL, so we can call this page in different ways to play different files. More on this later.

Now that we have the javascript code in the page, we need to add another Script component for the actual player. You may want to type any other content you want to display above the player first on the page, and then drag and drop another Script module below that.

In the Properties of the second Script module, replace the default text with this:

<a style="display:block;width:720px;height:420px" id="player"></a>
The above code creates a placeholder on the page to contain the flash player. No modification of the above code is necessary.

Save this page.

Now, choose one of your other pages to contain a link or links to your media files. On that page, enter some text to serve as the description of the media file which will be played. When we provisioned your flash streaming, we included a file named Extremists.flv - a sports video you can use to test the service. For the purposes of this article, let's assume you want to display that video, since it is likely to still be there unless you've deleted it. You can, of course, tweak these instructions to play any video you've uploaded.

On the page, enter the text "Extremists - sports video" or something along those lines as the description of the video.

Highlight that text, and click the Link button in the tool bar of the editor. (It's the button that looks like a globe with link from a chain in front of it.)

In the Link popup window, leave Link Type set to URL, change the Protocol to , and set the URL to player.php?mediafile=Extremists

Click the OK button, save the page, and publish your site.

Visit your website, and on the page where you created the link, you should be able to click the link and view the video. The end of the URL, mediafile=Extremists, is the portion which determines which video is played. If you uploaded a video called sermon.flv, you would make that mediafile=sermon to play that video.

The player will play other formats such as mp4, f4v, etc. For those formats, prepend the filename with MP4: and include file extension. So, if your uploaded video is sermon.f4v, make the end of the URL mediafile=MP4:sermon.f4v

Using this method, you can link to any number of different video from any number of your pages, and utilize the single player page to play them all.


Was this answer helpful?

Add to Favourites
Print this Article