DOWNLOADS EXAMPLES SKINS DOCS SUPPORT
 
 

Using Javascript

Wasp Publisher automatically generates all of the Javascript code needed to control the player.

After publishing a project, the "code" HTML page (example_code.html) includes the Javascript code needed to control the player. The process of using the code is as simple as copying and pasting code into your page.

Instance ID

Each project that you publish uses a unique naming convention for the Javascript controls.

You'll notice that for each function call, the first argument starts with a series of numbers.

Example:

wasp_pause("0805191632");

The series of numbers is referred to as the "Instance ID".

The Instance ID is used throughout the Wasp JavaScript System for a few reasons, including:

- To differentiate between Wasp instances and other objects on the page.

- To allow for the usage of more than one Wasp player on a single page.

- To identify and control specific instances of Wasp within a page.

You'll also notice that the Instance ID appears a few times within the "Embed" code, which is used to render the player on the page. Sometimes the Instance ID is attached to words (such as "waspTarget" or "wasp").

NOTE: You "Embed" code may look different, depending on how you've elected to render the player while using Wasp Publisher.

Example:

<!-- START WIMPY PLAYER CODE -->
<div id="waspTarget0805022528"><a href="http://www.adobe.com/products/flashplayer/">Flash Player upgrade required</a></div>
<script language="javascript">
wasp("0805022528", "000000", "210", "158", "example1.flv", "example1_poster.jpg");
</script>
<!-- END WIMPY PLAYER CODE -->

Each time you publish a project, a new Instance ID will be used within the resulting HTML files.

The code for the Javascript controls can not be mixed and matched with other previously embedded players, because each published player uses a unique identification number. The "Embed" code and the Play / Pause / Load controls are tied together via the Instance ID.

Therefore, it is important to always ensure that your Javascript controls code always references the proper Instance ID that is used within the "Embed" code.

Any alpha-numeric string can be used as the Instance ID -- do NOT use non-alpha-numeric characters). By default, Wasp Publisher uses a time-stamp for the Instance ID (YYMMDDHHMMSS). The Instance ID does not have to be elaborate -- it can be as simple as a single number, such as "8".

 

 

 

 

 

 

 

 

  ©Copyright Plaino LLC. All rights reserved.