On This Page …
Introduction
The On2 Flix Publisher for Flash® Software Development Kit (SDK) consists of complete API documentation and JavaScript/HTML sample code. As an On2 Flix Publisher licensee, you may adapt and extend the provided JavaScript helper libraries and HTML in any way you choose, royalty-free.
To be kept informed of the most recent On2 Flix Publisher SDK changes, please read the change log.
Publisher PlugIn API Documentation
The application programming interface (API) documentation for the On2 Flix Publisher plug-ins is extensively cross-referenced, and may be accessed via the Modules and Related Pages tabs, above.

This page is the Main Page.
On2Publisher Javascript API Documentation
As of the Publisher v3.2 release a javascript wrapper object called On2Publisher is provided with the sample code, and is the preferred means of interacting with the plug-in.
You can access the main index for the Javascript documentation, here.
Sample Code
The Flix Publisher SDK ships with sample code that demonstrates the main features of the API:
- Drag-and-drop file transcoding
- Video capture from a camera device
- Live streaming of camera capture to Adobe® Flash Media Server ®
- Encoder settings configuration
- Uploading
- jQuery/jQueryUI -based implementation

Setup Instructions
To run the sample code you must deploy it to a web server, and configure some key values in the configuration file. Most of the information has been configured for you, but you'll have to enter:
- your web server address
- settings for uploading files to your server (optional)
Do the following to configure the sample code.
- Step 1: (required) Set the host_root value in on2publisher-config.js
-
- The on2publisher-config.js configuration file is located in the on2publisher/js sub directory of your release archive.
- Locate host_root, it's near the top of the file.
- Replace the string assigned to host_root in its
declaration with your server address. Here's an example:
var host_root = "http://example.com";.
- (optional) If the sample code will not be hosted in a directory
named on2publisher at the root of your webserver, you must update
the string appended to host_root so that it's points to
the correct location. Here's an example:
host_root = host_root + "/example/partial/path/to/sample/root/";
- Replace the string assigned to host_root in its
declaration with your server address. Here's an example:
- The two above examples combine to form the URL
http://example.com/example/partial/path/to/sample/root/"
- Step 2: (optional) Set upload settings inon2publisher-config.js
-
Note:Publisher plug-ins can upload onlyto the built in FtpServer and HttpServer addresses. See the plug-in API documentation for more information.
- Set on2pub_config.FileUpload.PublishMethod to 0 for FTP uploads, or 1 for HTTP uploads
- For FTP uploads, configure the following values:
- Set on2pub_config.FileUpload.FtpSubDomain - to the sub domain of your FTP server.
- Set on2pub_config.FileUpload.FtpPort - to the port your FTP server listens on.
- Set on2pub_config.FileUpload.FtpUser - to your FTP user account name.
- Set on2pub_config.FileUpload.FtpPassword - to your FTP user account password.
- For HTTP uploads, configure the following values:
Note: If the SDK archive contents are deployed to the root of the web server configured in host_root, then only the first step will be necessary.
- Set on2pub_config.FileUpload.HttpSubDomain - to the sub domain of your FTP server.
- Set on2pub_config.FileUpload.HttpPath - to the path to upload.php on your web server.
- Set on2pub_config.FileUpload.FtpUser - to the HTTP upload form name (leave this alone if using upload.php).
- Step 3: (optional)Set output directory path in upload.php
-
You must set $webroot to your HTTP server document root, and ensure that PHP can write to $uploads_directory
- Step 4: (optional)Download JW FLV Player
-
To use the samples that include ouput file playback, you will need the JWPlayer FLV player. You can quickly locate this player using your favorite search engine. Search for "JW FLV Player".
Install the player in the same directory as the on2publisher directory containing the samples. Note: the publisher.on2.com demonstrations use the simple skin; you will need that as well if you want your sample pages to match.
- Step 5: Point a Windows browser at the sample directory on your web server
-
Pick one of the sample links to take your plug-in for a test drive.
Note: This step required only for HTTP uploading.
For configuration assistance, contact On2 Support.
Updates required for v2.x, v3.0, and v3.1 based code
This applies only to use of the plug-ins in Firefox. Code based on the old samples will continue to function within Internet Explorer.
Note: Code based on the old samples is NOT compatible with Apple Safari, Google Chrome, or Opera. To support additional browsers it is suggested you move to using the On2Publisher object, which is documented on this page.
Use of the v3.2 plug-ins in Firefox with the old sample code requires some minor changes:
- Comment out the entire get_ns_plugin() in flixpub_conf.js (obsoleted in v3.2)
-
Make the following change in the function fp_load() within flixpub_main.js:
Change on2pub = get_ns_plugin();
To on2pub = document.flixe;
- Your plug-in identifiers and archive names have changed. You must update your configuration file accordingly.
Product Details
The On2 Flix Publisher for Flash is a web browser plug-in that enables users to encode video content (either pre-recorded or captured live from a camera) in Adobe® Flash® 8 format and upload the video to a web site or file server.
If you are a web site that supports or wants to add Flash video sharing, blogging, or uploading, the On2 Flix Publisher offers the following advantages:
Entirely browser-based, incredibly simple to use - drag, drop, watch!
Save massive bandwidth costs - twice. Not only will On2 Flix Publisher’s Flash 8 video save you download bandwidth, but your users will be uploading compressed Flash 8 video to your service instead of large, poorly compressed (or worse, uncompressed) files.
Decreased server load. You won’t need racks of dedicated servers to compress uploaded video. Processor-intensive encoding is done on the user’s own computer!
Everything in one format. No codecs to license, no bizarre formats to support, no transcoding hassles. Every video user’s upload is in Flash 8 FLV format.
The best video quality, period. Flash 8 video quality is as good as and often better than Windows Media, Quicktime, Real, H.264, MPEG-4, and H.263/Spark. Flash 8 files are up to 40% smaller than Flash 7 files.
Less waiting. Users create web-ready Flash Videos on their computers that can be viewed immediately after upload to your website.
Support
For help with additional questions, please visit http://on2.com/company/feedback/.