生产环境 Cannot read property 'errorCallback' of undefined
Closed this issue · 10 comments
wukaMM commented
jiwenjiang commented
这个是你在自己程序里面写的errorback吗,可否提供更完整一点的代码。
发自我的iPhone
…------------------ 原始邮件 ------------------
发件人: wukaMM <notifications@github.com>
发送时间: 2019年11月29日 12:32
收件人: jiwenjiang/react-audio-analyser <react-audio-analyser@noreply.github.com>
抄送: Subscribed <subscribed@noreply.github.com>
主题: 回复:[jiwenjiang/react-audio-analyser] 生产环境 Cannot read property 'errorCallback' of undefined (#21)
大神,在本地测试的时候,都是很正常的,但是上到生产环境后,点击开始录音,就一直报这个错误,请问大神知道可能是什么导致的吗?
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub, or unsubscribe.
wukaMM commented
这个是仿照你前面的示例代码写的
const audioProps = {
status,
backgroundColor: '#fff',
strokeColor: '#0060FF',
width: 216,
height: 40,
audioOptions: {
type: 'audio/mp3'
},
audioBitsPerSecond: 128000,
timeslice: 1000,
startCallback: (e) => {},
pauseCallback: (e) => {},
stopCallback: (e) => {},
onRecordCallback: (e) => {
this.setState({
period: period + 1
})
},
errorCallback: (err) => {
message.error(err);
}
};
只有这个地方有 errorCallback
wukaMM commented
不好意思啊,这个代码这么粘贴出来连缩进都没有了[Facepalm]
alokupadhya commented
Got same error
alokupadhya commented
alokupadhya commented
Problem solved by switching http to https
PragunSaini commented
Did you find the cause of this error?
jiwenjiang commented
not yet
发自我的iPhone
…------------------ 原始邮件 ------------------
发件人: Pragun Saini <notifications@github.com>
发送时间: 2020年8月19日 19:41
收件人: jiwenjiang/react-audio-analyser <react-audio-analyser@noreply.github.com>
抄送: j_bleach <513755565@qq.com>, Comment <comment@noreply.github.com>
主题: 回复:[jiwenjiang/react-audio-analyser] 生产环境 Cannot read property 'errorCallback' of undefined (#21)
Did you find the cause of this error?
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub, or unsubscribe.
alokupadhya commented
Did you find the cause of this error?
because mic access required a secure connection (https).
jiwenjiang commented
生产环境 需要https