WeiWeiXinNet/admin/Recorder/WebForm.aspx

(开头部分) 3KB

这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。

<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="WebForm.aspx.cs" Inherits="WebApplicationXX.WebForm" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">


<html>
<head>
	<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
	<title>Live input record and playback</title>
  <style type='text/css'>
    ul { list-style: none; }
    #recordingslist audio { display: block; margin-bottom: 10px; }
  </style>
   <link href="css/style.css" rel="stylesheet" type="text/css" />
</head>
<body>

  <h1>Record to MP3 Test</h1>

  <button onclick="startRecording(this);">record</button>
  <button onclick="stopRecording(this);" disabled>stop</button>
  
  <h2>Recordings</h2>
  <ul id="recordingslist"></ul>
  
  <h2>Log</h2>
  <pre id="log"></pre>

  <script>
      function __log(e, data) {
          log.innerHTML += "\n" + e + " " + (data || '');
      }

      var audio_context;
      var recorder;

      function startUserMedia(stream) {
          var input = audio_context.createMediaStreamSource(stream);
          __log('Media stream created.');
          __log("input sample rate " + input.context.sampleRate);

          input.connect(audio_context.destination);
          __log('Input connected to audio context destination.');

          recorder = new Recorder(input);
          __log('Recorder initialised.');
      }

      function startRecording(button) {
          recorder && recorder.record();
          button.disabled = true;
          button.nextElementSibling.disabled = false;
          __log('Recording...');
      }

      function stopRecording(button) {
          recorder && recorder.stop();
          button.disabled = true;
          button.previousElementSibling.disabled = false;
          __log('Stopped recording.');
后面还有 59 行代码,购买后查看完整代码

24 小时内免费解锁 3 个项目,之后 1 算力/个。 规则说明

AI 解读 AI

登录后可用,每次 10 算力,解读结果公开显示在下面。

还没有人解读过这个文件。