Url
Defined in: system/url.ts:23
Class for adding a web source to the stage. URLs will use http by default unless https is specified. This class supports adding locally hosted HTML files as well.
Basic Usage
Section titled “Basic Usage”var XJS = require('xjs');var Url = XJS.Url;
var urlPromise = new Url('https://www.xsplit.com').addToScene();Implements
Section titled “Implements”Addable
Constructors
Section titled “Constructors”Constructor
Section titled “Constructor”new Url(
url):Url
Defined in: system/url.ts:31
param: (url: string)
Creates a URL object. If unspecified, protocol is http.
Parameters
Section titled “Parameters”string
Returns
Section titled “Returns”Url
Methods
Section titled “Methods”addToScene()
Section titled “addToScene()”addToScene(
value?):Promise<any>
Defined in: system/url.ts:63
param: (value?: number | Scene)
return: Promise<any>Adds this URL to the current scene as an HTML source by default. 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.
Will only raise an error if URL is not http or https.
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