1.2.0 • Published 6 months ago

js-dahua-talk v1.2.0

Weekly downloads
-
License
MIT
Repository
-
Last release
6 months ago

js-audio-talk

npm 或 yarn 安装

yarn add js-dahua-talk

引用

import { Talker2 } from 'js-dahua-talk'







const startButton = document.getElementById('start')

const stopButton = document.getElementById('stop')

let talker= null

startButton.onclick = () => {
  
  talker = new Talker({socketUrl: 'ws://192.168.1.108:40001/talk'})

  talker.start()

}



stopButton.onclick = () => {

	talker.stop()

}

注意

通过 MediaDevices.getUserMedia() 获取用户多媒体权限时,需要注意其只工作于以下三种环境:

  • localhost 域

  • 开启了 HTTPS 的域

  • 使用 file:/// 协议打开的本地文件

http环境下解决方法

参考文档

https://recorder.zhuyuntao.cn/

https://github.com/rochars/alawmulaw

1.2.0

6 months ago

1.1.0

7 months ago

1.0.0

8 months ago