Comments Plugin Installation

IndexLoading the Comments Plugin into FCPlayer



where is it

After your set-up is complete, the next step is to load the plugin into FCPlayer, so that it will appear in the player’s menu bar.


Loading the comments plugin through FCPlayer.play

You load the comments plugin into FCPlayer in the same way that you load any other plugin into the menu bar. Loading plugins into the menu bar is discussed in the FCPlayer documentation, Add plugins to the menu bar. You should be familiar with calling FCPlayer.play and with loading plugins in general before preceding.

Below we have a call to FCPlayer.play with the comments plugin included:

FCPlayer.play('null','null','sample.flv',
{
           title:'Sample Video',
           plugins:['comments'],
           comments:{
                      videoID:1,
                      commentsPerPage:20
           }
};

The helper object for the comments plugin is called comments, as you can see above.

This object take two parameters:

  • videoID: (required) A unique numeric ID for the video.
  • commentsPerPage: (required) The number of comments that will be displayed per page.

When you use the comments plugin, you will need to assign each of your videos a unique numeric ID. Though it is not necessary, you will probably also want to give each of your videos a distinct title, as this makes moderating the comments a bit easier. Without a title, you will have to rely on the videoID alone for identifiying to which video a comment belongs.


An example

Here is an example of a web page with FCPlayer installed and the comments plugin loaded into the menu bar:

<html>
<title>Test Page for FCPlayer Comments</title>
<head></head>
<body>

<script type="text/javascript" src="/FCPlayer/js/import.config.js"></script>
<script type="text/javascript" src="/FCPlayer/js/import.jquery.js"></script>
<script type="text/javascript" src="/FCPlayer/js/import.fcplayer.js"></script>
<script type="text/javascript" src="/FCPlayer/js/install.fcplayer.window.js"></script>
<a onclick="return FCPlayer.play('null','null','sample.flv',
{
    title:'Sample Video',
    plugins:['comments'],
    comments:{
        videoID:1,
        commentsPerPage:20
    }
}
);" href="">Play Video</a>
</body></html>

That’s basically it. Now you should be well on your way to server comments with your videos.

Next, let’s take a look at the comments plugin administration.



If you have a pre-sales question, submit your inquiry via our sales contact page. For general, non-sales inquiries, contact us at support@fastcatsoftware.com.

Solution Graphics