Skip to content

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.

var XJS = require('xjs');
var Url = XJS.Url;
var urlPromise = new Url('https://www.xsplit.com').addToScene();
  • Addable

new Url(url): Url

Defined in: system/url.ts:31

param: (url: string)

Creates a URL object. If unspecified, protocol is http.

string

Url

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.

number | Scene

Promise<any>

Addable.addToScene