Giter VIP home page Giter VIP logo

react-audio-analyser's Issues

safari支持

大神打算什么时候支持一下safari吗

Error when install on a next project

Any ideas why i get this error ?

thanks

Client pings, but there's no entry for page: /_error
/App_Next_reactStrapV2/node_modules/react-audio-analyser/lib/index.js:4
import AudioAnalyser from './AudioAnalyser';
^^^^^^^^^^^^^

SyntaxError: Unexpected identifier
at new Script (vm.js:80:7)
at createScript (vm.js:274:10)
at Object.runInThisContext (vm.js:326:10)

Cannot record on IOS

Hi, due to IOS updates the package is not working now.
On android everything is fine, but on IOS the recorder is not working (including the package demo)

Issue with import ./AudioAnalyser

I face this issue when testing. A similar Issue was mentioned in closed issues, but there was no answer. Apparently, the issue is from importing the AudioAnalyser component outside any module at https://github.com/jiwenjiang/react-audio-analyser/blob/master/lib/index.js line 4.

`C:\Users...\node_modules\react-audio-analyser\lib\index.js:4
import AudioAnalyser from './AudioAnalyser';
^^^^^^

SyntaxError: Cannot use import statement outside a module
at compileFunction ()
at wrapSafe (internal/modules/cjs/loader.js:931:16)
at Module._compile (internal/modules/cjs/loader.js:979:27)
at Module._compile (C:\Users...\node_modules\pirates\lib\index.js:99:24)
at Module._extensions..js (internal/modules/cjs/loader.js:1035:10)
at Object.newLoader [as .js] (C:...\node_modules\pirates\lib\index.js:104:7)`

react antd 下运行报错

image

按照readME 里面的做法
npm install react-audio-analyser --save
拷贝demo
运行npm run start 出现上图的错误。 这是怎么回事?

完整的demo代码:
import React, {Component} from 'react';
import ReactDOM from 'react-dom';
import './index.css';
import { DatePicker } from 'antd';

import AudioAnalyser from "react-audio-analyser";

export default class Demo extends Component {
constructor(props) {
super(props)
this.state = {
status: null
}
}

controlAudio(status) {
    this.setState({
        status
    })
}

render() {
    const {status, audioSrc} = this.state;
    const audioProps = {
        audioType: "audio/wav", // supported audio/wav,audio/mp3, default audio/webm
        status, // Triggering component updates by changing status
        audioSrc,
        startCallback: (e) => {
            console.log("succ start", e)
        },
        pauseCallback: (e) => {
            console.log("succ pause", e)
        },
        stopCallback: (e) => {
            this.setState({
                audioSrc: window.URL.createObjectURL(e)
            })
            console.log("succ stop", e)
        }
    }
    return (
        <AudioAnalyser {...audioProps}>
            <div className="btn-box">
                {status !== "recording" &&
                <i className="iconfont icon-start" title="开始"
                   onClick={() => this.controlAudio("recording")}></i>}
                {status === "recording" &&
                <i className="iconfont icon-pause" title="暂停"
                   onClick={() => this.controlAudio("paused")}></i>}
                <i className="iconfont icon-stop" title="停止"
                   onClick={() => this.controlAudio("inactive")}></i>
            </div>
        </AudioAnalyser>
    );
}

}

function App() {
return (
<div style={{ margin: 100 }}>

AntDesign Demo







);
}

ReactDOM.render(, document.getElementById('root'));

录制时长问题

大神你好,想问下,如何在录制的过程中同时获取已经录制的时长秒数呢?

获取的音频分段问题

你好,现在的录音是基于两个按钮,《开始》《停止》来结束一段录音的,我们现在想实现一种类似长连接的方式的录音,即点击开始录音(有点像打开录音模式),保持录音状态,说一句,过了一会,又说一句,过了一会又说一句,能不能分别获取第一句,第二句,第三句的内容,即监测某句话是否说完了然后分别只发送这一句话的流内容呢?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.