Overview
JavaScript is a robust scripting language capable of executing advanced control over multiple scopes; Scene level, Project Level, Application Level, or Master Control Panels. ECMA Scripting Language JavaScript component uses the ECMAScript Language standard as defined by the links below. https://developer.mozilla.org/en-US/docs/Web/JavaScript https://tc39.es/ecma262/ Java Script Effect and Resource
Java Script Effect can be applied to any scene Graphic Object.
Java Script Resource can be applied to the Scene, Project, and Application levels as well as Master Control Panels.
To edit a JavaScript: click the edit pencil icon. This will open the Scripting panel within Prime.
From here, you can set options, add parameters, edit the code in the Scripting window, and Execute or Halt scripts for testing.
Execute On Load Checking this option will cause the script to execute automatically when the scene is loaded in playout
Mode Allows changing whether the script is run in Asynchronous mode (on a background thread), or in Synchronous mode (blocking until finished). Changing to Synchronous Mode will enable the Timeout property.
Timeout Specifies the number of seconds that will run in Synchronous mode before timing out.
JavaScript Advanced Options
Enable File Loading
Allows code defined in external .js files to be imported into the script using the import keyword. The default location of module files is the Scripts folder of the Project folder belonging to the current project. Enable XMLHttpRequest Allows creating a new XMLHttpRequest object that can be used for downloading data from a server. Enable Window Functions Enables window functions within the script. For example alert, confirm, prompt, MsgBox and InputBox. Enable Host functions Enables the host keyword within the script. See the HostFunctions section below for more info. Enable Extended Host functions Enables the xHost keyword within the script. See the ExtendedHostFunctions section below for more info.
Enable XMLHttpRequest
Allows creating a new XMLHttpRequest object that can be used for downloading data from a server. Enable Window Functions Enables window functions within the script. For example alert, confirm, prompt, MsgBox and InputBox.
Enable Host functions
Enables the host keyword within the script. See the HostFunctions section below for more info.
Enable Extended Host functions
Enables the xHost keyword within the script. See the ExtendedHostFunctions section below for more info.
JavaScript Parameters
Click Add and Remove to edit the parameters of the selected JavaScript object. Any Parameters added to the JavaScript effect will be saved with the effect. All child parameter objects are natively accessible from within the script code.
To Save a new script
Click the disk icon and select Save or Save As.
To import an existing JavaScript
Navigate to script file using the File browser.