Members
-
The length of the current command queue.
Methods
-
Sends the command queue for execution and returns a
Promise
that will resolve to an iterable containing the results of all commands whosewant_response
argument wastrue
. On command error they will resolve with a RS.Command_error. If the queue was created withwait_for_render
set totrue
(see RS.Stream#queue_commands) then the last iterable will contain the first rendered image that contains the results of the commands as a RS.Stream~Rendered_image.The promise will reject in the following circumstances:
- there is no WebSocket connection.
- the WebSocket connection has not started (IE: RS.Service#connect has not yet resolved).
Fires:
Returns:
Type Description Promise -
Adds a command to the command queue.
Name Type Default Description command
Command The command to add.
want_response
Boolean false optional Whether we want a response from this command or not
-
Sends the command queue for execution and returns an array of promises that will resolve to the results of all commands whose
want_response
argument wastrue
. On command error they will resolve with a RS.Command_error. If the queue was created withwait_for_render
set totrue
(see RS.Stream#queue_commands) then there will be an additionalPromise
at the end of the array that will resolve with a RS.Stream~Rendered_result just before the RS.Stream#event:image event that contains the result of this command is emitted.Fires:
Throws:
-
This call will throw an error in the following circumstances:
- there is no WebSocket connection.
- the WebSocket connection has not started (IE: RS.Service#connect has not yet resolved).
- Type
- RS.Error
Returns:
Type Description Array.<Promise> An Array
ofPromises
. -