Screen
Defined in: system/screen.ts:32
The Screen Class is the object returned by #system/System System Class getAvailableScreens method. It provides you with methods to add the screen object to the current scene or any scene specified or use it’s static method to fire a selector for you to manually select a screen/screen region to capture and add on your selected scene.
Basic Usage
Section titled “Basic Usage”var XJS = require('xjs');var System = XJS.System;
System.getAvailableScreens().then(function(screens) { for (var i in screens) { screens[i].addToScene(); }});Implements
Section titled “Implements”Addable
Constructors
Section titled “Constructors”Constructor
Section titled “Constructor”new Screen(
props?):Screen
Defined in: system/screen.ts:38
Parameters
Section titled “Parameters”props?
Section titled “props?”Returns
Section titled “Returns”Screen
Methods
Section titled “Methods”addToScene()
Section titled “addToScene()”addToScene(
value?):Promise<any>
Defined in: system/screen.ts:59
param: (value?: number | Scene)
return: Promise<any>Adds the prepared screen instance to the current screen by defualt. Accpets optional parameter value, whhich when supplied, points to the scene where the item will be added instead. If ready config {listenToItemAdd: true} it returns item id, else returns boolean.
Note: There is yet no way to detect error responses for this action.
Parameters
Section titled “Parameters”value?
Section titled “value?”number | Scene
Returns
Section titled “Returns”Promise<any>
Implementation of
Section titled “Implementation of”Addable.addToScene
addToScene()
Section titled “addToScene()”
staticaddToScene(value?):Promise<any>
Defined in: system/screen.ts:98
param: (value?: number | Scene)
return: Promise<any>Initializes the screen region selector crosshair so user may select a desktop region or a window to add to the stage in the current scene. Accepts an optional parameter value, which, when supplied, points to the scene where item will be added instead. If ready config {listenToItemAdd: true} it returns item id, else returns boolean.
Note: There is yet no way to detect error responses for this action.
Parameters
Section titled “Parameters”value?
Section titled “value?”number | Scene
Returns
Section titled “Returns”Promise<any>
parse()
Section titled “parse()”
staticparse(screenInfo):Screen
Defined in: system/screen.ts:128
param: Object
return ScreenConverts an object into a Screen object.
var XJS = require('xjs');var screen = XJS.Screen.parse(jsonObj);Parameters
Section titled “Parameters”screenInfo
Section titled “screenInfo”any
Returns
Section titled “Returns”Screen