mirror of
https://github.com/scratchfoundation/scratch-vm.git
synced 2024-12-24 06:52:40 -05:00
Add @param documentation for the frameInfo descriptor param
This commit is contained in:
parent
a86202b8e2
commit
fe7aa8a78f
1 changed files with 9 additions and 0 deletions
|
@ -134,6 +134,15 @@ class Video {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Return frame data from the video feed in a specified dimensions, format, and mirroring.
|
* 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.
|
* @return {ArrayBuffer|Canvas|string|null} Frame data in requested format, null when errors.
|
||||||
*/
|
*/
|
||||||
getFrame ({
|
getFrame ({
|
||||||
|
|
Loading…
Reference in a new issue