The Truveo Brightcove plugin allows you to add video search to your Brightcove player with a one line addition to your Brightcove template file.
Once added, users of your Brightcove player will be presented with an interface to search for videos within your channel, or optionally, across the entire web. The interface will be shown when the user clicks the Menu button in the player, or when the currently playing video has completed playing. When the user selects a Brightcove video asset from your channel, the video will play in the Brightcove player. Web-wide videos will open in a new browser window. You also have the option to disable Web-wide searching, if you would prefer to restrict users to search within your channel.
To integrate the Truveo Brightcove plugin with your existing Brightcove player template, follow these steps:
-
Sign up for a Truveo API Account
-
Construct the Plugin Source URL to your customized Truveo Brightcove plugin. The format of the URL is:
http://www.truveo.com/brightcove/release/truveo_search.swf?channelName=<your channel name>&appid=<your appid>
-
channelName refers to the Truveo Channel Name that corresponds to your channel. For example, this may be "SFGate".
-
appid refers to the API account id that you received after signing up for a Truveo API Account.
Both of the previous parameters are required. Additional, optional parameters available to you are:
-
hideWebWideSearch Add this parameter to your URL and set the value to "true" to hide the Web-wide search option in the plugin. For example:
http://www.truveo.com/brightcove/release/truveo_search.swf?channelName=<your channel name>&appid=<your appid>&hideWebWideSearch=true
-
hideSearchBar Add this parameter to your URL and set the value to "true" to hide the entire search bar, including search options. For example:
http://www.truveo.com/brightcove/release/truveo_search.swf?channelName=<your channel name>&appid=<your appid>&hideSearchBar=true
-
Open your existing Brighcove player template in the Brightcove Publishing interface. An example player template may look like:
<Runtime>
<Theme name="Deluxe" style="Light"/>
<Layout>
<Canvas>
<VideoPlayer id="videoPlayer" width="480" height="420"/>
</Canvas>
</Layout>
<Labels>
<label key="controls menu">Search</label>
</Labels>
</Runtime>
Modify the template by adding the following line in the <Canvas> section (replace your plugin source URL with the URL you constructed in the previous step):
<SWFLoader id="truveo_widget" width="480" height="420" source="<your plugin source URL>" depth="2" visible="false"/>
So, for example, if your channel is "SFGate", and you want to allow both channel-specific and web-wide search, the resulting template would look like:
<Runtime>
<Theme name="Deluxe" style="Light"/>
<Layout>
<Canvas>
<VideoPlayer id="videoPlayer" width="480" height="420"/>
<SWFLoader id="truveo_widget" width="480" height="420" source="<http://www.truveo.com/brightcove/release/truveo_search.swf?channelName=SFGate&appid={your app id}>" depth="2" visible="false"/>
</Canvas>
</Layout>
<Labels>
<label key="controls menu">Search</label>
</Labels>
</Runtime>
After you have finished editing your template, click "Save Changes" in the Brightcove Publishing interface, and allow Brightcove to publish to live players (if applicable). That's it! You should now have video search available for all Brightcove players that use this template.