Returns a list of available input sources. This is a wrapper for MediaDevices.enumerateDevices() - Web APIs | MDN and it returns a Promise.
実例
シンタックス
getSources([successCallback], [errorCallback])
パラメーター
successCallback
Function:
This callback function handles the sources when they have been enumerated. The callback function receives the deviceList array as its only argument
errorCallback
Function:
This optional callback receives the error message as its argument.
リターン
Promise: Returns a Promise that can be used in place of the callbacks, similar to the enumerateDevices() method
Notice any errors or typos? Please let us know. Please feel free to edit lib/addons/p5.sound.js and open a pull request!