Add @param documentation for the frameInfo descriptor param

This commit is contained in:
Corey Frang 2018-04-06 11:01:09 -04:00 committed by Michael "Z" Goddard
parent a86202b8e2
commit fe7aa8a78f
No known key found for this signature in database
GPG key ID: 762CD40DD5349872

View file

@ -134,6 +134,15 @@ class Video {
/**
* Return frame data from the video feed in a specified dimensions, format, and mirroring.
*
* @param {object} frameInfo A descriptor of the frame you would like to receive.
* @param {Array.<number>} frameInfo.dimensions [width, height] array of numbers. Defaults to [480,360]
* @param {boolean} frameInfo.mirror If you specificly want a mirror/non-mirror frame, defaults to the global
* mirror state (ioDevices.video.mirror)
* @param {string} frameInfo.format Requested video format, available formats are 'image-data' and 'canvas'.
* @param {number} frameInfo.cacheTimeout Will reuse previous image data if the time since capture is less than
* the cacheTimeout. Defaults to 16ms.
*
* @return {ArrayBuffer|Canvas|string|null} Frame data in requested format, null when errors.
*/
getFrame ({