1.0.1 • Published 2 years ago

audio-handler v1.0.1

Weekly downloads
-
License
MIT
Repository
github
Last release
2 years ago

audio-handler

아래의 기능을 수행하는 node.js 라이브러리 입니다.

  • javascript navigator 객체를 사용하여 연결된 장비를 조회
  • 특정 장비의 MediaStream 객체 반환, 스트림 시작 및 중지
  • 사용 가능 장비(마이크, 스피커) 및 권한 체크
const audioControl = require('audio-handler');
await audioControl.startInputStream().then(stream=>console.log(stream));

API

.getConnectedDevices(type)

type에 따라서 ('audioinput' or 'audiooutput) 사용 가능한 마이크, 스피커 장비 리스트를 반환

.isAudioCheck(kind)

.isMicCheck()

.isSpeakerCheck()

.isPermission(deviceId)

.initInput()

.initOutput()

.startInputStream(deviceId)

.startOutputStream()

.stopStream(stream)

.deviceCheck()

1.0.1

2 years ago

1.0.0

3 years ago