Skip to content

ISourceHtml

Defined in: core/source/ihtml.ts:28

getBrowserLoadStatus: () => Promise<string>

Defined in: core/source/ihtml.ts:252

return: Promise

Gets the load status of the html May return as any of the following:

  • ‘LOADED’ -> HTML is already loaded
  • ‘NOT LOADED’ -> HTML is not yet loaded
  • ‘LOAD ERROR’ -> Error in loading HTML
  • ‘UNKNOWN’ -> URL used is invalid or when status is checked right after adding new HTML source
  • ‘UNAVAILABLE’ -> Method for getting load status is unavailable for the XBC version

Promise<string>

call(func, arg): Promise<ISourceHtml>

Defined in: core/source/ihtml.ts:37

param: (func: string, arg: string)

return: Promise<ISourceHtml>

Allow this source to call a pre-exposed function within the HTML Source

string

string

Promise<ISourceHtml>


enableBrowser60FPS(value): Promise<ISourceHtml>

Defined in: core/source/ihtml.ts:94

param: Promise

return: Promise<ISourceHtml>

Enable or disable browser source to render up to a maximum of 60FPS

Chainable.

boolean

Promise<ISourceHtml>


enableBrowserJS(value): Promise<ISourceHtml>

Defined in: core/source/ihtml.ts:197

param: (value: boolean)

return: Promise<ISourceHtml>

Enables or disables execution of the set BrowserJs upon load. Note that disabling this will require item to be refreshed in order to remove any BrowserJS previously executed.

Chainable.

boolean

Promise<ISourceHtml>


enableBrowserTransparency(value): Promise<ISourceHtml>

Defined in: core/source/ihtml.ts:75

param: Promise

return: Promise<ISourceHtml>

Enable or disable transparency of CEF browser

Chainable.

boolean

Promise<ISourceHtml>


enableCustomCSS(value): Promise<ISourceHtml>

Defined in: core/source/ihtml.ts:232

param: (value: boolean)

return: Promise

Enables or disables application of custom CSS to the document

boolean

Promise<ISourceHtml>


enableReloadOnSceneEnter(value): Promise<ISourceHtml>

Defined in: core/source/ihtml.ts:284

param: (value: boolean)

return: Promise

Enables or disables refresh of source upon entering a scene containing an item of it (via setVisible)

boolean

Promise<ISourceHtml>


enableReloadOnShow(value): Promise<ISourceHtml>

Defined in: core/source/ihtml.ts:268

param: (value: boolean)

return: Promise

Enables or disables refresh of source upon showing (via setVisible)

boolean

Promise<ISourceHtml>


getAllowRightClick(): Promise<boolean>

Defined in: core/source/ihtml.ts:135

return: Promise

Check if right click events are sent to the item or not.

item.getAllowRightClick().then(function(isRightClickAllowed) {
// The rest of your code here
});

Promise<boolean>


getBrowserCustomSize(): Promise<Rectangle>

Defined in: core/source/ihtml.ts:105

return: Promise

Gets the custom browser window size (in pixels) for the item, if set, regardless of its layout on the mixer. Returns a (0, 0) Rectangle if no custom size has been set.

See also: #util/Rectangle Util/Rectangle

Promise<Rectangle>


getBrowserJS(): Promise<string>

Defined in: core/source/ihtml.ts:163

return: Promise

Gets the javascript commands to be executed on item upon load

Promise<string>


getCustomCSS(): Promise<string>

Defined in: core/source/ihtml.ts:204

return: Promise

Gets the custom CSS applied to the document upon loading

Promise<string>


getURL(): Promise<string>

Defined in: core/source/ihtml.ts:44

return: Promise

Gets the URL of this webpage source.

Promise<string>


isBrowser60FPS(): Promise<boolean>

Defined in: core/source/ihtml.ts:82

return: Promise

Check if browser can render up to a maximum of 60FPS

Promise<boolean>


isBrowserJSEnabled(): Promise<boolean>

Defined in: core/source/ihtml.ts:183

return: Promise

Gets if BrowserJS is enabled and executed on load

Promise<boolean>


isBrowserOptimized(): Promise<boolean>

Defined in: core/source/ihtml.ts:239

return: Promise

Gets if browser instance is optimized via surface sharing

Promise<boolean>


isBrowserTransparent(): Promise<boolean>

Defined in: core/source/ihtml.ts:63

return: Promise

Check if browser is rendered transparent

Promise<boolean>


isCustomCSSEnabled(): Promise<boolean>

Defined in: core/source/ihtml.ts:223

return: Promise

Gets if custom CSS is enabled and applied to the document on load

Promise<boolean>


isReloadOnSceneEnterEnabled(): Promise<boolean>

Defined in: core/source/ihtml.ts:275

return: Promise

Gets if source will refresh upon entering a scene containing an item of it (via setVisible)

Promise<boolean>


isReloadOnShowEnabled(): Promise<boolean>

Defined in: core/source/ihtml.ts:259

return: Promise

Gets if source will refresh upon showing (via setVisible)

Promise<boolean>


isSourceAvailable(): Promise<boolean>

Defined in: core/source/ihtml.ts:299

return: Promise

Check if file used as source is available

item.isSourceAvailable().then(function(isAvail) {
// The rest of your code here
});

Promise<boolean>


setAllowRightClick(value): Promise<ISourceHtml>

Defined in: core/source/ihtml.ts:156

param: (value:boolean)

return: Promise<ISourceHtml>

Allow or disallow right click events to be sent to the item. Note that you can only catch right click events using mouseup/mousedown

Chainable

item.setAllowRightClick(true).then(function(item) {
// Promise resolves with the same Item instance
});

boolean

Promise<ISourceHtml>


setBrowserCustomSize(value): Promise<ISourceHtml>

Defined in: core/source/ihtml.ts:120

param: Promise

return: Promise<ISourceHtml>

Sets the custom browser window size for the item regardless of its layout on the mixer

Chainable.

See also: #util/Rectangle Util/Rectangle

Rectangle

Promise<ISourceHtml>


setBrowserJS(value): Promise<ISourceHtml>

Defined in: core/source/ihtml.ts:176

param: (js: string, refresh: boolean = false)

return: Promise

Sets the javascript commands to be executed on item right upon setting and on load. Optionally set second parameter to true to refresh item (needed to clean previously executed JS code.)

Chainable.

string

Promise<ISourceHtml>


setCustomCSS(value): Promise<ISourceHtml>

Defined in: core/source/ihtml.ts:216

param: (value: string)

return: Promise<ISourceHtml>

Sets the custom CSS to be applied to the document upon loading

Chainable.

string

Promise<ISourceHtml>


setURL(value): Promise<ISourceHtml>

Defined in: core/source/ihtml.ts:56

param: (url: string)

return: Promise<ISourceHtml>

Sets the URL of this webpage source.

Chainable.

string

Promise<ISourceHtml>