<commit_before><!DOCTYPE html>
<html lang="en">
  <head>
  <link rel="stylesheet" href="qunit/qunit.css" type="text/css" media="screen" />
  <style>
    textarea {
      width: 99.5%;
      height: 300px;
    }
    button {
      display: inline-block;
    }
  </style>
  <script src="qunit/jquery.min.js"></script>
  <script src="../recorder.js"></script>

  <script>
  log = function(message){
    var val = $("#debug").val();
    $("#debug").val([val, message].join("\n"));
    $("#debug")[0].scrollTop = 99999999;
  }
  $(function(){
    log("Calling Recorder.initialize()");
    Recorder.initialize({
      "swfSrc": "../recorder.swf?" + Math.random(),
      initialized: function(){
        log("Initialized!");
      }
    });  

    $("#record").on("click", function(){
      log("Calling Recorder.record()");
      Recorder.record({
        start: function(){
          log("Recording...");
        },
        progress: function(ms){
          log("Record progressed: " + ms + "ms");
        }
      });
    });
    $("#stop").on("click", function(){
      log("Calling Recorder.stop()");
      Recorder.stop()
    });
    $("#play").on("click", function(){
      log("Calling Recorder.play()");
      Recorder.play({
        progress: function(ms){
          log("Play progressed: " + ms + "ms");
        }
      });
    });

    $("#upload").on("click", function(){
      log("Calling Recorder.upload()");
      Recorder.upload({
        method: "POST",
        url: "http://typewriter.tw/a" + Math.random(),
        audioParam: "data",
        params: {
          "_method": "PUT"
        },
        success: function(responseText){
          log("Uploaded\n");
          window.res = responseText;
        },
      });
    });

    $("#getDebugLog").on("click", function(){
      log(" === Flash Debug Log === \n" + Recorder.flashInterface().debugLog().join("\n") + " === End Debug Log === \n");
    });
  });
  </script>
  </head>
  <body>
    <h1 id="qunit-header">Recorder.js Manual Test</h1>
    <div id="content">
    <textarea id="debug" readonly="readonly">Debugging Log</textarea><br/><commit_msg>fix upload to typewriter in test/manual.html<commit_after><!DOCTYPE html>
<html lang="en">
  <head>
  <link rel="stylesheet" href="qunit/qunit.css" type="text/css" media="screen" />
  <style>
    textarea {
      width: 99.5%;
      height: 300px;
    }
    button {
      display: inline-block;
    }
  </style>
  <script src="qunit/jquery.min.js"></script>
  <script src="../recorder.js"></script>

  <script>
  log = function(message){
    var val = $("#debug").val();
    $("#debug").val([val, message].join("\n"));
    $("#debug")[0].scrollTop = 99999999;
  }
  $(function(){
    log("Calling Recorder.initialize()");
    Recorder.initialize({
      "swfSrc": "../recorder.swf?" + Math.random(),
      initialized: function(){
        log("Initialized!");
      }
    });  

    $("#record").on("click", function(){
      log("Calling Recorder.record()");
      Recorder.record({
        start: function(){
          log("Recording...");
        },
        progress: function(ms){
          log("Record progressed: " + ms + "ms");
        }
      });
    });
    $("#stop").on("click", function(){
      log("Calling Recorder.stop()");
      Recorder.stop()
    });
    $("#play").on("click", function(){
      log("Calling Recorder.play()");
      Recorder.play({
        progress: function(ms){
          log("Play progressed: " + ms + "ms");
        }
      });
    });

    $("#upload").on("click", function(){
      log("Calling Recorder.upload()");
      Recorder.upload({
        method: "POST",
        url: "http://typewriter.tw/a" + Math.random() * 100000,
        audioParam: "data",
        params: {
          "_method": "PUT"
        },
        success: function(responseText){
          log("Uploaded\n");
          window.res = responseText;
        },
      });
    });

    $("#getDebugLog").on("click", function(){
      log(" === Flash Debug Log === \n" + Recorder.flashInterface().debugLog().join("\n") + " === End Debug Log === \n");
    });
  });
  </script>
  </head>
  <body>
    <h1 id="qunit-header">Recorder.js Manual Test</h1>
    <div id="content">
    <textarea id="debug" readonly="readonly">Debugging Log</textarea><br/>
{'fraction_non_alphanumeric': 0.21913002806361084, 'fraction_numerical': 0.009354536950420954, 'mean_word_length': 2.367716535433071, 'pattern_counts': {'":': 4, '<': 43, '<?xml version=': 0, '>': 43, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 2, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7344344', 'n_tokens_mistral': 1381, 'n_tokens_neox': 1343, 'n_words': 243}