//=========================================================================//
//  
//  File:  $Workfile: flixpub_conf.js$
//         $Revision: 14$
//
//  Date:  $DateUTC: 2007-06-29 18:01:59Z$
//
//  Brief: Required Configuration Parameters for Flix Publisher
//         
//  Note:  Edit "REQUIRED PARAMETERS", below.
//
//=========================================================================//


/* --------------------------------------------------------------------------

REQUIRED PARAMETERS
===================

In order for the sample Publisher implementation to work, you MUST change 
the following values to suit your server environment.

The configuration is broken into sections.  If you're unfamiliar with the
Publisher plug-ins, or if you're upgrading from the version 2 plug-ins, 
please be sure to read the comments above each parameter.


SUMMARY OF PARAMETERS
=====================
Section 1:  Shared parameters

  fp_scheme
  fp_hostname  
  fp_debug

Section 2a:  Internet Explorer Plug-in Parameters (ActiveX)

  cab_source
  cab_version
  ie_class_id
  
Section 2b:  Netscape Plug-in Parameters (Firefox, Mozilla, Flock, etc.)

  xpi_source
  xpi_name
  xpi_version
  np_mime_type
  get_ns_plugin()               (function)
  
Section 2c:  Mac Safari Plug-in Parameters

  macsafari_package_source
  macsafari_plugin_name
  macsafari_mime_type
  macsafari_version
  macsafari_iframe_name

Section 3a:  Image Location Parameters

  image_location
  flixpub_startup_bg_image
  flixpub_validate_bg_image
  flixpub_record_bg_image
  flixpub_upload_bg_image
  flixpub_capture_bg_image          (Only shown on Mac)
  flixpub_encode_bg_image           (Only shown on Mac)
  flixpub_encode_complete_bg_image  (Only shown on Mac)
  flixpub_broadcast_bg_image

Section 3b:  UI HTML Fragments

  flixpub_block_ui_markup 
  flixpub_firefox_auth_markup
  flixpub_macsafari_install_markup

Section 4:  Upload Parameters

  upload_mode
  upload_sub_domain
  upload_form_name
  upload_path_http
  upload_path_ftp
  upload_username
  upload_password_ftp
  upload_form_var_names         (array)
    upload_form_var_names[n]
  upload_form_var_values        (array)
    upload_form_var_values[n]
  upload_req_hdr_names          (array)
    upload_req_hdr_names[n]
  upload_req_hdr_values         (array)
    upload_req_hdr_values[n]
  upload_md5_enable
  upload_md5_form_var
  upload_md5_name
  upload_http_success_200
  upload_http_success_message
  upload_reload_on_success
  upload_next_page_success
  get_upload_redirect_query_string() (function)
  upload_next_page_error
  upload_max_attempts
  

Section 5:  User Interface Control Parameters

  flixpub_record
  flixpub_record_enc_ui
  flixpub_record_fms_ui
  flixpub_transcode
  flixpub_transcode_enc_ui
  flixpub_transcode_fms_ui

Section 6:  Encoding Parameters

  Output Duration
  
  flixpub_flv_max_duration 
  
  Transcoding
  
  flixpub_flv_width
  flixpub_flv_height
  flixpub_flv_fps

  Recording
  
  flixpub_flv_width_capture
  flixpub_flv_height_capture
  flixpub_flv_fps_capture
  
  Video Encoding
  
  flixpub_flv_video_bitrate
  flixpub_flv_video_rate_control_mode
  flixpub_flv_video_compression_mode
  flixpub_flv_video_keyframe_mode
  flixpub_flv_video_keyframe_rate
  
  Audio Encoding
  
  flixpub_flv_audio_bitrate
  flixpub_flv_audio_codec
  
Section 7:  Fms Connection Monitor Parameters

  flixpub_fmsmon_enable
  flixpub_fmsmon_poll_delay
  flixpub_fmsmon_poll_timeout
  flixpub_fmsmon_poll_func
  flixpub_fmsmon_poll_args 	    (array)
    flixpub_fmsmon_poll_args[n]

Section 8:  FMS Authentication Parameters
  flixpub_fms_auth_mode
  flixpub_fms_auth_arg_functions (array)
    flixpub_fms_auth_arg_functions[n]


-------------------------------------------------------------------------- */
//  SECTION 1: Shared parameters
//  ============================

//  Scheme
//  ------
// 
//  Scheme for URLs generated from settings in this file
//  
//  Leave this alone unless you are absolutely sure of what you are doing.

var fp_scheme = "http://";



//  Web Server Hostname
//  -------------------
// 
//  Leave the hostname blank if your environment requires you to host the 
//  plug-in CAB and XPI files on one host, and your images on another host.
//
//   Examples:
//
//    Correct:   localhost
//    Correct:   on2.com
//    Correct:   www.on2.com
//
//   This string can contain only your web server host, do not add 
//   anything else to the contents of the string:
//
//    Incorrect: www.on2.com/        // do not add the trailing /
//    Incorrect: http://www.on2.com  // do not add the http:// 

var fp_hostname = "streamservice.sc-streaming.com";



// JS Debug Logging
// -------------------
//
//  Shows the logging div.
//

var fp_debug = false;



//  SECTION 2a: Internet Explorer Plug-in Parameters (ActiveX)
//  =========================================================


//  Plug-in URL
//  -----------
//
//  Location (URL) of the On2-provided binary plug-in for the Microsoft
//  Internet Explorer browser.  Note that your server's filesystem is 
//  probably case-sensitive, so capitalization matters.
//
//  Example:  
//    var cab_source = fp_scheme + fp_hostname + "/plugins/on2_flix_publisher.CAB";
//
//  If your web host requires you to host the plug-ins and images on seperate 
//  servers, set cab_source to a complete URL.  For example:
//
//    var cab_source = "http://example.com/plugins/on2_flix_publisher.cab";
//

var cab_source = fp_scheme + fp_hostname + "/encoder/plugins/magic_publisher.CAB";



//  Version Number
//  --------------
//
//  Find this value in the file `plugin-info.txt`.
//
//  Note that Internet Explorer plug-in version numbers include *commas* 
//  rather than periods. 

var cab_version = "3,1,5,2";



//  Internet Explorer ActiveX Control Class ID
//  ------------------------------------------
//
//  Find this value in the file `plugin-info.txt`.

var ie_class_id = "CLSID:FFC2BFE2-97F6-4FC7-B57F-CF191E8BF386";



//  SECTION 2b:  Netscape Plug-in Parameters (Firefox, Mozilla, Flock, etc.)
//  =======================================================================

//  Plug-in URL
//  -----------
//
//  Location (URL) of the On2-provided binary plug-in for Mozilla-based
//  browsers (e.g. Firefox). Note that your server's filesystem is probably 
//  case-sensitive, so capitalization matters.
//
//    var xpi_source = fp_scheme + fp_hostname + "/plugins/npon2publish.xpi";
//
//  If your web host requires you to host the plug-ins and images on seperate 
//  servers, set xpi_source to a complete URL.  For example:
//
//    var xpi_source = "http://example.com/plugins/npon2flixpublisher.xpi";

var xpi_source = fp_scheme + fp_hostname + "/v2/encoder/plugins/npmagicpublisher.xpi";



//  Plug-in Name
//  ------------
//
//  The value of the xpi_name variable is displayed in the confirmation dialog 
//  box when a user is prompted to allow plug-in installation. 
//
//  xpi_name is for display purposes only.  It is used only in the 
//  installation confirmation dialog, and should be set to the name you wish
//  users to use when referring to your flix publisher plug-ins.
//
//  Example:  XYZ Widget

var xpi_name = "Streamcity Magic Publisher";



//  Version Number
//  --------------
//  Find this value in the file `plugin-info.txt`.
//
//  Note that Mozilla-compatible plug-in version numbers include periods. 

var xpi_version = "3.1.5.2";



//  MIME-Type
//  ---------
//
//  Find this value in the file `plugin-info.txt`.

var np_mime_type = "application/x-magicpublisher-plugin";



//  Loading Function
//  ----------------
//
//  Find this value in the file `plugin-info.txt`.
//
//  Change REPLACE_ME_WITH_INTERFACE_NAME to the 'netscape plug-in interface' 
//  string.

function get_ns_plugin() { return document.flixe.nsIMagicPublisher; }



//  SECTION 2c: Mac Safari Plug-in Parameters
//  =========================================
//   Safari Mac Plug-in Parameters (Mac ONLY)
// 

//  Plug-in Package URL
//  -------------------
//
//  Location (URL) of the On2-provided binary plug-in for the Safari browser.
//  Must be a fully-formed URL.  Also, note that 
//  your server's filesystem is probably case-sensitive, so capitalization 
//  matters.
//
//  Example:  http://example.com/publisher/plugins/MyCompany_publisher.dmg

var macsafari_package_source = fp_scheme + fp_hostname + "/encoder/plugins/magicpublisher.dmg";



//  Name
//  ----
//
//  This name is used to detect the plug-in within Safari on the Mac.
//
//  Example: On2 Flix Publisher Plug-In

var macsafari_plugin_name = "Magic Publisher";



//  MIME-Type
//  ---------
//
//  Find this value in the file `plugin-info.txt`.  Used for plug-in embed tag.
//
//  Example: application/x-on2publisher-plugin

var macsafari_mime_type = "application/x-magicpublisher-plugin";



//  Version Number
//  --------------
//
//  Version number of Mac Safari Plug-in.

var macsafari_version = "2.1.17.2";



//  Parent IFrame Name
//  ------------------
//
//  If the plugIn is loaded within an iframe, the iframe name must be known
//  by the plugIn for events to be received.
//
//  Leave the value empty if not using an iframe.

var macsafari_iframe_name = "encodeContainer";



//  SECTION 3:  Image Location Parameters
//  =====================================

//  Images Directory URL
//  --------------------
//
//  The sample Publisher implementation must be able to find needed images 
//  (graphics).
//
//  Provide the path to the location of the SDK sample images on your 
//  webserver. 
//
//  Example:
//    var image_location = fp_scheme + fp_hostname + "/images/";
//
//  If your web host requires you to host the plug-ins and images on seperate 
//  servers, set image_location to a complete URL.  For example:
//
//    var image_location = "http://example.com/images/";

var image_location = fp_scheme + fp_hostname + "/encoder/images/";



//  Image File Names
//  ----------------
//
//  The Publisher sample includes several background images that help to 
//  inform users of their options.
//
//  These variables control which images are shown.  Change the image file 
//  names to display your own images.


//  Start Image
//
//  This image is displayed when the sample is first loaded

var flixpub_startup_bg_image = 'pub_bkgnd_start.gif';



//  Validation Image
//
//  This image is displayed when a user drags a file onto the plug-in.

var flixpub_validate_bg_image = 'pub_bkgnd_validating.gif';



//  Recording Image
//
//  This image is displayed when a user clicks the "Record Video" button.

var flixpub_record_bg_image = 'pub_bkgnd_record.gif';



//  Uploading Image
//
//  This image is displayed while an upload is in progress.

var flixpub_upload_bg_image = 'pub_bkgnd_uploading.gif';



//  Mac Capture Image
//
//  The Mac plug-ins displays this image instead of capture video preview.
//  The image is shown only when showing capture preview would harm video
//  quality due to consuming too many system resources.  The example image 
//  informs users about why it is being shown.

var flixpub_capture_bg_image = 'pub_bkgnd_capture_in_progress.gif';



//  Mac Encoding Image
//
//  The Mac plug-ins displays this image while an encode is in progress.

var flixpub_encode_bg_image = 'pub_bkgnd_encode_in_progress.gif';



//  Mac Encode Complete Image
//
//  The Mac plug-ins displays this image after encoding completes.

var flixpub_encode_complete_bg_image = 'pub_bkgnd_encode_complete.gif';


//  Broadcast Image
//
//  Provides instructions to users of the broadcast demo.  This image is the 
//  only image displayed by the broadcast demonstration.

var flixpub_broadcast_bg_image = 'pub_bkgnd_start_broadcast.gif';



//  SECTION 3b:  UI HTML Fragments
//  =====================================

//  Block UI HTML
// 
//  The HTML in this parameter controls the appearance of the block UI box.

var flixpub_block_ui_markup = '<img src="images/on2_notech_147x120_trans.png" /><br><p>Please wait...</p>';

//  Firefox Installation Authorization HTML
// 
//  The HTML in this parameter controls the image shown to users of Firefox
//  instructing users to allow installation of Add-ons from the current site
//  in order to install the Netscape PlugIn.

var flixpub_firefox_auth_markup = '<img src="images/firefox_install_instructions.png" />';


//  Firefox Installation Authorization HTML
// 
//  The HTML in this parameter controls the image shown to users of Mac Safari
//  instructing users to click the image to begin download of the plugIn 
//  installer.

var flixpub_macsafari_install_markup = '<img src="images/macsafari_install_instructions.png" />';


//  SECTION 4:  Upload Parameters
//  =============================
//
//  The following parameters control Publisher file uploading.


//  Mode
//  ----
//
//  For FTP uploading, leave upload_mode set to kUploadModeFtp
//  For upload via HTTP Form POST, set upload_mode to kUploadModeHttpFormPost
//  For upload via HTTP binary application/octet-stream POST, set upload_mode
//   to kUploadModeHttpBinPost
//
//  This value should NOT be in quotes.

var upload_mode = kUploadModeFtp;



//  Subdomain
//  ---------
//
//  Your Publisher plugins are configured to work only with pages served from 
//  your domain.  If you would like to store uploaded files at a URL that 
//  includes a subdomain, enter the subdomain name here.  Leave this value 
//  empty ("") if you are not using a subdomain.
//
//  Ordinary domain:  http://example.com/
//  Example:          var upload_sub_domain = "";
//
//  Subdomain:        http://movies.example.com/
//  Example:          var upload_sub_domain = "movies";

var upload_sub_domain = "magicupload";


//  Form Name (HTTP uploading only)
//  --------------------------
//
//  Name of upload form when upload_mode is kUploadModeHttpFormPost.
// 
//  The default value of "uploadedfile" works with the uploading sample scripts
//  provided by On2.  Change the value to "file" for uploading to an S3 bucket.

var upload_form_name = "uploadedfile";

//  Path (HTTP uploading only)
//  --------------------------
//
//  Path and arguments for use of upload.php on your webserver.  Most users 
//  will not need to change this.
//
//  The Publisher sample implementation includes an example PHP script that 
//  can be used as the target for HTTP uploads, called `upload.php`. 
//  Publisher assumes that this script is in the same directory as the sample 
//  HTML page.  If for some reason you've moved `upload.php` to a subdirectory, 
//  you will need to add a path specification to the following value.  No 
//  leading slash.

var upload_path_http = "upload.php?action=upload";



//  Path (FTP uploading only)
//  -------------------------
//
//  Path to the destination directory on the FTP server.  Leave it empty to 
//  upload to the FTP user's home directory. No leading slash. Trailing slash 
//  required.  Note that the directory must exist, and must be writable by the 
//  FTP user.

var upload_path_ftp = "";



//  Username (**required** for FTP, optional for HTTP)
//  --------------------------------------------------
//
//  Enter your FTP username here (cannot be blank).  In the case of HTTP 
//  uploads, Publisher will send this value as POST data, for processing by the 
//  server-side script.  The example script `upload.php` uses this string to 
//  name output files.

var upload_username = "service";


//  FTP Password
//  ------------
//
//  If your FTP server requires authentication, enter the password of the user 
//  given in `upload_username`, above.

var upload_password_ftp = "stream";


//  HTTP Form Variables
//  -------------------
//
//  These are for use only with uploads of type kUploadModeHttpFormPost

var upload_form_var_names = new Array;
var upload_form_var_values = new Array;


// FORM VARIABLE INSTRUCTIONS 
//  You add form variables like this:
//
//   upload_form_var_names[0] = "varName";
//   upload_form_var_values[0] = "varValue";
// 
//  Don't forget to increment the array index!
// 
//  Your first parameter will be just like the above, your second will be:
//
//   upload_form_var_names[1] = "anotherVarName";
//   upload_form_var_values[1] = "anotherVarValue";
//
// Note the 1s, for your next variable they'll be 2s, and so on, and so on...



// HTTP Request Headers 
// --------------------
// (for use with all HTTP upload types)

var upload_req_hdr_names = new Array;
var upload_req_hdr_values = new Array;



// REQUEST HEADER INSTRUCTIONS 
//  Add request headers like this:
//
//   upload_req_hdr_names[0] = "Example-Header-Name";
//   upload_req_hdr_values[0] = "Example-Header-Value";
// 
//  Don't forget to increment the array index!
// 
//  Your first parameter will be just like the above, your second will be:
//
//   upload_req_hdr_names[1] = "Another-Example-Header-Name";
//   upload_req_hdr_values[1] = "Another-Example-Header-Value";
//
//  Note the 1s, for your next header they'll be 2s, and so on, and so on...



// ENABLE MD5 CHECKSUM
//  For use only with HTTP uploads.  If enabled, the MD5 checksum of the file 
//  being uploaded will be sent to the web server.  The MD5 checksum is in Hex 
//  form.

var upload_md5_enable = false;



// MD5 CHECKSUM UPLOAD TYPE
//  Controls method of uploading MD5 string.  If upload_md5_form_var == true,
//  the MD5 checksum will be uploaded as a form variable.  Only checked if
//  upload_md5_enable == true.

var upload_md5_form_var = false;



// MD5 CHECKSUM PARAMETER NAME
//  Controls the name of the MD5 checksum parameter in the HTTP POST.  Only 
//  checked if upload_md5_enable == true.

var upload_md5_name = "MD5-Checksum";



// HTTP POST TARGET IS FILE
//   Controls target of POST.  If set to true, post target will be a FLV file
//   name generated using the current date and time.  
//   Generally speaking, upload_http_target_is_file should only be set to true 
//   if upload_mode == kUploadModeHttpBinPost.

var upload_http_target_is_file = false;



// HTTP SUCCESS CODE
//  200's enough.  In other words, if the HTTP server returns HTTP 200 OK, 
//  and that's how your web server is setup to respond to an upload that was 
//  successful, set upload_http_success_is_200 = true.  Generally speaking, 
//  upload_http_success_200 should only be set to true if upload_mode == 
//  kUploadModeHttpBinPost.

var upload_http_success_200 = false;



// HTTP SUCCESS MESSAGE
//  Only set this variable if your web server returns content data that should
//  be scanned for the presence of a string or particular code that denotes 
//  file upload success.  If you leave the value as it is currently set, it 
//  will work with the upload.php file included with the SDK.  Please note 
//  that the upload.php file included with the SDK requires that 
//  upload_mode == kUploadModeHttpFormPost.

var upload_http_success_message = "File successfully uploaded";



// RELOAD THE BROWSER ON SUCCESSFUL UPLOAD
//  Set upload_reload_on_success to true to have the reference application
//  reload the page when an upload is successful.

var upload_reload_on_success = false;



// REDIRECT LOCATION FOR USERS AFTER SUCCESSFUL UPLOADS
//  If the length of the upload_next_page_success string is non-zero, the 
//  user's browser will be directed to upload_next_page_success via a 
//  document.location = upload_next_page_success;

var upload_next_page_success = "";



// QUERY STRING FOR SUCCESSFUL UPLOADS
//  This function is called from the uploadComplete() event handler in 
//  flixpub_advanced.js.  It will only be called for successful uploads.
//
//  The string returned by this function will be used in this manner:
//
//      query_str = get_upload_redirect_query_string(plugin_object);
//
//      if (query_str.length > 0 && query_str.charAt(0) === "?")
//          document.location = upload_next_page_success + query_str;
//      else                
//          document.location = upload_next_page_success;

function get_upload_redirect_query_string(pub) {

    // This commented out code is an example of how a query string might be 
    // generated.  The example is taken from publisher.on2.com.
    
    //var qs = "?length_time=" + pub.EncodedDuration
    //    + "&videobitrate=" + pub.VideoBitrate
    //    + "&audiobitrate=" + pub.AudioBitrate
    //    + "&height=" + pub.OutputFileHeight
    //    + "&width=" + pub.OutputFileWidth
    //    + "&filename=" + pub.getHttpVar("filename");
    //return qs;

    // the following line is a placeholder; remove it if you uncomment the 
    // above code or add your own.
    return "";
}



// REDIRECT LOCATION FOR USERS AFTER FAILED UPLOADS
//  If the length of the upload_next_page_error string is non-zero, the 
//  user's browser will be directed to upload_next_page_error via a 
//  document.location = upload_next_page_error;

var upload_next_page_error = "";



// UPLOAD RETRY COUNT
//  If greater than 1, upload will be retried upon failure.
//  Retry 'loop' breaks if one of two conditions is true:
//    1. upload succeeds
//    2. attempts > upload_max_attempts - 1
//
//  It is strongly recommended that upload_max_attempts be left at its default 
//  value until you're sure you have configured uploading parameters correctly.

var upload_max_attempts = 1;



//  SECTION 5:  User Interface Control Parameters
//  =============================================
//
//  The following parameters control the portions of the UI that are enabled

// RECORDING
//  If you want to allow your users to record videos with their camera devices,
//  flixpub_record must be set to true.

var flixpub_record = true;



// RECORDING - ALLOW USERS TO CHANGE ENCODE SETTINGS
//  If you want to allow your users to change the encode settings for recorded
//  videos, flixpub_record_enc_ui must be set to true.

var flixpub_record_enc_ui = true;



// RECORDING - ALLOW USERS TO STREAM RECORDED VIDEO TO FLASH MEDIA SERVERS
//  If you want to allow your users to stream their recorded videos to Flash
//  Media Servers of their choosing, flixpub_record_fms_ui must be set to true.

var flixpub_record_fms_ui = true;



// TRANSCODING
//  If you want to allow your users to transcode existing videos,
//  flixpub_transcode must be set to true.

var flixpub_transcode = true;



// TRANSCODING - ALLOW USERS TO CHANGE ENCODE SETTINGS
//  If you want to allow your users to change the encoding settings for 
//  transcoded videos, flixpub_transcode_enc_ui must be set to true.

var flixpub_transcode_enc_ui = true;



// TRANSCODING - ALLOW USERS TO STREAM TRANSCODED VIDEO TO FLASH MEDIA SERVERS
//  If you want to allow your users to stream transcoded video to Flash Media 
//  Servers, flixpub_transcode_fms_ui must be set to true.

var flixpub_transcode_fms_ui = true;



//  SECTION 6:  Encoding Parameters
//  ===============================
//
//  The following parameters control the encoding settings used to create FLV
//  files.  The default values should be adequate for a wide variety of
//  publisher plug-in uses.

// MAXIMUM OUTPUT FLV DURATION
//  This controls the maximum duration of encoding by the plug-ins.  It 
//  controls the duration of files and FMS broadcasts.
//  The value is in milliseconds, with the default being 5 minutes (300000 ms)

var flixpub_flv_max_duration = 7200000;

// FILE TRANSCODING SETTINGS
//  WIDTH
//   flixpub_flv_width controls the output width, in pixels, of FLVs produced 
//   from pre existing files.

var flixpub_flv_width  = 420;



//  HEIGHT
//   flixpub_flv_height controls the output height, in pixels, of FLVs produced 
//   from pre existing files.

var flixpub_flv_height = 236;



//  FRAME RATE
//   flixpub_flv_width controls the output frame rate, in frames per second, of 
//   FLVs produced from pre existing files.

var flixpub_flv_fps    = 22;



// RECORDING SETTINGS
// Default width, height, and frame rate settings for recording from capture 
// sources. Recording directly to FLV can be a very CPU intensive process.  It
// is recommended that you leave these settings at their defaults.
//  WIDTH
//   flixpub_flv_width_capture controls the output width, in pixels, of FLVs 
//   produced from live sources.

var flixpub_flv_width_capture = 320;



//  HEIGHT
//   flixpub_flv_height_capture controls the output height, in pixels, of FLVs 
//   produced from live sources.

var flixpub_flv_height_capture = 240;



//  FRAME RATE
//   flixpub_flv_fps_capture controls the output frame rate, in frames per second, of 
//   FLVs produced by recording from live sources.

var flixpub_flv_fps_capture = 15;



// GENERAL VIDEO ENCODING SETTINGS
//  VIDEO BITRATE
//   Data rate, in kilobits per second, of output FLV video.  Higher numbers 
//   generally produce higher quality video.

var flixpub_flv_video_bitrate = 460;



//  VIDEO BITRATE CONTROL MODE
//   kBitrateModeCBR - constant bit rate, best for streaming (default)
//   kBitrateModeVBR - variable bit rate, best for progressive download and/or
//                     local playback.

var flixpub_flv_video_rate_control_mode = kBitrateModeVBR;



//VIDEO CODEC
var flixpub_flv_codec = 1;

//  VIDEO COMPRESSION MODE
//   Compression quality:
//   - kCompressModeRealTime is fastest/lowest quality
//   - kCompressModeGood is slower than realtime, but produces higher quality 
//      output.
//   - kCompressModeBest is slower than good, and should only be used for 
//     transcoding raw/lossless input.
//  note: for recording, values other than kCompressModeRealTime are ignored

var flixpub_flv_video_compression_mode = kCompressModeBest;



//  VIDEO KEY FRAME MODE
//   kKeyframeModeAuto - lets the compression algorithm determine key frame 
//                       placement.  (default/optimal)
//   kKeyframeModeConstFrequency - place key frames in the output at a fixed
//                                 interval.

var flixpub_flv_video_keyframe_mode  = kKeyframeModeAuto;



//  VIDEO KEY FRAME FREQUENCY
//   Behavior varies based on value of flixpub_flv_video_keyframe_mode.  If 
//   flixpub_flv_video_keyframe_mode is kKeyframeModeAuto, 
//   flixpub_flv_video_keyframe_rate is used as the maximum distance between key
//   frames in the video stream.  If flixpub_flv_video_keyframe_mode is
//   kKeyframeModeConstFrequency, a key frame will be placed in the video stream 
//   every flixpub_flv_video_keyframe_rate video frames.

var flixpub_flv_video_keyframe_rate = 22;	// num frames between keyframes 



// AUDIO SETTINGS
//  AUDIO BITRATE
//   Note: not all audio bitrates are supported.  When a rate is unsupported,
//   the codec's most closely matching supported bitrate is used instead.

var flixpub_flv_audio_bitrate = 96;



//  AUDIO CODEC
//   - Use kAudioCodecMp3 to create FLVs with MP3 audio. (support for MP3 
//     audio requires that the user system have a MP3 encoder ACM installed)
//   - Use kAudioCodecNellyMoser to create FLVs with Nellymoser audio. 
//     (Nellymoser audio support is built in and requires no 3rd party 
//     components on user systems)

var flixpub_flv_audio_codec = kAudioCodecMp3;



//  SECTION 7:  FMS Connection Monitor Parameters
//  ================================================================
//
//  The following parameters control the FMS connection monitor.

// ENABLE MONITORING
//  Set flixpub_fmsmon_enable to true to enable FMS connection monitoring.  
//  Monitoring requires the presence of a function in the server side action
//  script that returns at least some data to the plug-in.   See the comment
//  above flixpub_fmsmon_poll_func for an example of the action script 
//  function.
//  

var flixpub_fmsmon_enable = false;



// POLLING DELAY
//  Milliseconds the plug-in waits between polling attempts.  
//
//  Note: 
//   Polling attempts will be 
//    flixpub_fmsmon_poll_delay + flixpub_fmsmon_poll_timeout 
//   milliseconds apart when a timeout occurs.

var flixpub_fmsmon_poll_delay = 500;



// TIMEOUT
//  Milliseconds the plug-ins wait for a response from the server side 
//  action script function before a timeout occurs.

var flixpub_fmsmon_poll_timeout = 500;



// POLLING FUNCTION
//  Name of the server side action script function the plug-in should call
//  for connection monitoring.
//
//  Example action script function:
// 
//   function client_ping()
//   {
//       // just some logging
// 	     trace("ping: flixpub client polled");
//
//       // response message
// 	     var s = "this must not be empty";
//
//       // Client.call the flixpub plug-in
//       this.call("make_up_any_name_you_want", null, s);
//
//       // just some logging
//       trace("called client fn with {" + s + "}");
//   }
// 
//   // prototype the function
//   Client.prototype.ping = client_ping;
//
//  The plug-ins will pass args to the function if they are specified.  See
//  flixpub_fmsmon_poll_args.

var flixpub_fmsmon_poll_func = "ping";



// MONITOR FUNCTION ARGUMENTS
//
//  Strings added to the flixpub_fmsmon_poll_args array will be passed to the 
//  FMS action script function as individual arguments in array order.

var flixpub_fmsmon_poll_args = new Array;

// MONITOR FUNCTION ARGUMENT INSTRUCTIONS 
//  You add arguments like this:
//
//   flixpub_fmsmon_poll_args[0] = "arg1";
// 
//  Don't forget to increment the array index!
// 
//  Your first argument will be just like the above, your second will be:
//
//   flixpub_fmsmon_poll_args[1] = "arg2";
//
//  Note the 1, for your next argument it'll be a 2, and so on, and so on...



//  SECTION 8:  FMS Authentication Parameters
//  ================================================================
//
//  The following parameters control the authentication mode used to 
//  connect to FMS.

// FMS AUTHENTICATION MODE
//  Controls authentication mode used to authenticate connection to remote FMS.
//  Modes:  
//   0 - kFmsAuthModeOff
//   1 - kFmsAuthModeAkamai
//   2 - kFmsAuthModeLimelight
//   3 - kFmsAuthModeCustom  
//
//  Note: For kFmsAuthModeAkamai and kFmsAuthModeLimelight, username and 
//  password must be set by the user.  To allow for username and password, the 
//  FMS settings panel includes username and password fields when in one of 
//  these modes.
//   

var flixpub_fms_auth_mode = kFmsAuthModeOff;


// FMS AUTHENTICATION FUNCTIONS
//  Array of fp.util.fms_auth_function_holder, use to store FMS 
//  functions and their arguments.  Plug-ins will call FMS functions with the
//  supplied arguments at connection time in order to authenticate.
//
//  Leave this section alone, it declares the holder array.
// 

var flixpub_fms_auth_arg_functions = new Array;


// FUNCTION AND ARGUMENT INSTRUCTIONS 
//
//  Leave this section alone, it defines the holder object.
//
var fp = new Object;
fp.util = new Object;

fp.util.fms_auth_function_holder = function (fname) {
	this.function_name = fname;
	this.args = new Array;
}

fp.util.fms_auth_function_holder.prototype = {
	get_args: function() {
        return this.args;
	},
    add_arg: function(arg_str) {
        this.args[this.args.length] = arg_str;
    },
    get_func: function() {
        return this.function_name;
    },
    set_func: function(new_fname) {
        this.function_name = new_fname;
    }
}

//
//  To add functions and arguments, you must populate the array declared above
//  with fp.util.fms_auth_function_holder objects.  This is a three step 
//  process.
//  

//  Step 1.  Create the holder object
//
//    To make a fp.util.fms_auth_function_holder object, do this:
//
//      var function_holder = new fp.util.fms_auth_function_holder("functionName");
//
//    You'll want to replace functionName with the name of your ActionScript 
//    function.  
//
//    To call application.onConnect, use the name onConnect.
//

//  Step 2.  Add arguments to the holder object
//
//    Add arguments fo the fms_auth_function_holder object like this:
//
//      function_holder.add_arg("arg 1");
//      function_holder.add_arg("arg 2");
//      function_holder.add_arg("arg N");
//
//    You can add as many arguments as you want, or none at all.
// 

//  Step 3. Add your holder object to the array
//
//    Your first array entry will look like this: 
//
//      flixpub_fms_auth_arg_functions[0] = function_holder;
//
//    To additional entries, repeat steps 1 and 2 with a new function holder 
//    object.  Then:
//
//      flixpub_fms_auth_arg_functions[1] = function_holder;
//
//  Note the 1, for your next holder object it'll be a 2, and so on, and so on...

// ***** END OF FILE *****

