Panel | ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|
| ||||||||||||
ON THIS PAGE
|
...
[string or double] storage_quota
Sets the total size (in bytes) allotted to all local storage applications (including IndexedDB). A BrightScript integer is only guaranteed to be able to represent a count of bytes up to 2GB so avoid using integers when calculating the size: Use float or double instead since they can represent values over 2GB (string can also be used but is not recommended). If the storage path is specified without a storage quota, Chromium defaults to reserving 1GB plus 10% of the total size of the storage device.
[roMessagePort] port
Configures the message port to which the roHtmlWidget instance will send events. When using initialization parameters, the port
parameter should be used instead of the SetPort()
method to ensure the script can catch load-started
, load-finished
, and load-error
events.
...
Enables or disables pinch-to-zoom functionality, which is disabled by default.
...
SetTransform(
...
transform As
...
String) As
...
Enables or disables Chromium security checks for cross-origin requests, local video playback from HTTP, etc. (if the argument is Boolean). This method can also accept an associative array, which can contain the following parameters:
[Boolean] websecurity
: Enables Chromium security checks. This parameter is identical to passing a Boolean argument to the method itself.[Boolean] camera_enabled
: Enables webpage access to USB cameras connected to the player (access is disabled by default). This allows support for WebRTC applications.[Boolean] insecure_https_enabled
: Instructs the widget to ignore security errors when connecting to insecure HTTPS hosts (insecure HTTPS is desabled by default). Enabling this feature makes the player insecure; it is not suitable for production environments and should only be used for testing.
Note | ||
---|---|---|
| ||
The |
EnableMouseEvents(enable As Boolean) As Boolean
Enables response to mouse/touchscreen presses if true
. Setting this method to false
(the default) disables this feature.
SetPortrait(portrait_mode As Boolean) As Boolean
Sets the widget orientation to portrait if true
. If this method is false
(the default), the widget is oriented as a landscape.
Warning | ||
---|---|---|
| ||
The |
SetTransform(transform As String) As Boolean
Sets the screen orientation of content in the widget (note that the coordinates and dimensions of the roRectangle containing the widget are not affected by rotation). This method accepts the following strings:
"identity"
: There is no transform (i.e. the widget content is oriented as landscape). This is the default setting."rot90"
: The widget content is rotated to portrait at 90 degrees (clockwise)."rot270"
: The widget content is rotated to portrait at 270 degrees (counter-clockwise).
Note | ||
---|---|---|
| ||
The JavaScript |
SetAlpha(alpha As Integer) As Boolean
Sets the overall alpha level for the widget (the default equals 255).
EnableScrollbars(scrollbars As Boolean) As Boolean
Enables automatic scrollbars for content that does not fit into the viewport if true
. Setting this method to false
(the default) disables this feature.
AddFont(filename As String) As Boolean
Supplies additional or custom typefaces for the HTML rendering engine. Supported font types include TrueType Font files (.ttf) and Web Open Font files (.woff, .woff2).
SetPcmAudioOutputs(outputs As roArray) As Boolean
Configures the PCM audio output for the HTML widget. This method accepts one or more outputs in the form of an roArray of roAudioOutput instances.
SetCompressedAudioOutputs(outputs As roArray) As Boolean
Configures compressed audio output (e.g. Dolby AC3 encoded audio) for the HTML widget. This method accepts one or more outputs in the form of an roArray of roAudioOutput instances.
Note | ||
---|---|---|
| ||
When one or more audio-output methods are called, they will override the settings of the following ifAudioControl methods: |
SetMultichannelAudioOutputs(outputs As roArray) As Boolean
...
Sets the default HWZ mode for HTML video. Normally, HWZ must be enabled in each <video>
tag, but passing "on" to this string enables HWZ for all <video>
elements. This method can also accept a semicolon-separated list of HWZ parameters:
on/off
: Enables or disables HWZ mode.z-index
: Sets the default z-ordering for<video>
elements. A positive integer places the video in front of all graphics; a negative integer places the video behind all graphics; and a zero value disables HWZ mode completely. You can customize the z-ordering of individual video elements with respect to each other by inserting the "z-index" parameter into the<video>
tag.transform
: Sets the default rotation for<video>
elements. HWZ mode must be enabled for transforms to work.identity
: No transformation (default behavior)rot90
: 90 degree clockwise rotationrot180
: 180 degree rotationrot270
: 270 degree clockwise rotationmirror
: Horizontal mirror transformationmirror_rot90
: Mirrored 90 degree clockwise rotationmirror_rot180
: Mirrored 180 degree clockwise rotationmirror_rot270
: Mirrored 270 degree clockwise rotation
fade
: Sets the fading behavior for<video>
elements.auto
: Videos transition without fade effects. This is the default behavior.-
always
: When a video ends, the video window will go black. The new video will then fade in.
-
luma-key/cr-key/cb-key
: Enables luma and/or chroma keying for<video>
elements. HWZ mode must be enabled for luma/chroma keying to work.
Code Block | ||
---|---|---|
| ||
html.SetHWZDefault("on; transform:rot90; luma-key:#ff0020;") |
SetVideoPlayerDefaults(defaults As roAssociativeArray) As Boolean
Sets default playback settings for <video>
elements in the widget. Available parameters are identical to the roVideoPlayer.PlayFile() method. Default settings will be overwritten by parameters specified in individual <video>
elements.
ForceGpuRasterization(enable As Boolean) As Boolean
Enables GPU rasterization for HTML graphics. This method will take effect for subsequent page loads only. If Chromium determines that a page is not compatible, it will refuse to enable GPU rasterization for that page.
Note | ||
---|---|---|
| ||
This method has been deprecated. As of OS8, GPU rasterization is enabled by default and calling this method has no effect. |
EnableCanvas2dAcceleration(enable As Boolean) As Boolean
Enables 2D canvas acceleration. This will improve the framerate of most HTML pages that use 2D animations, but can cause out-of-memory issues with pages that use a large number of off-screen canvas surfaces.
Note | ||
---|---|---|
| ||
This setting has been deprecated. As of OS8, Canvas acceleration is enabled by default and can be disabled by passing |
...
Applies the specified user stylesheet to the page(s) loaded in the widget. The parameter is a URI specifying any file:
resource in the storage. The stylesheet can also be specified as inline data in the following form:
Code Block |
---|
"data:text/css;charset=utf-8;base64,<base64 encoded data>" |
This method will fail if you specify the inline data in any other order or if you use any data format other than base64.
FlushCachedResources() As Boolean
Discards any resources that Chromium has cached in memory.
SetLocalStorageDir(file_path As String) As Boolean
Configures the HTML storage path. This method takes effect when a new roHtmlWidget instance is created; it doesn't apply to the roHtmlWidget instance on which it is called.
Note | ||
---|---|---|
| ||
As of OS8, the |
SetWebDatabaseDir(file_path As String) As Boolean
Configures the HTML storage path. See the SetLocalStorageDir()
entry above for details.
This method takes effect when a new roHtmlWidget instance is created; it doesn't apply to the roHtmlWidget instance on which it is called.
...
Configures the HTML storage path. See the SetLocalStorageDir()
entry above for details.
This method takes effect when a new roHtmlWidget instance is created; it doesn't apply to the roHtmlWidget instance on which it is called.
SetLocalStorageQuota(maximum As Dynamic) As Boolean
Sets the total size (in bytes) for all persistent HTML storage on the player. This method can accept a string, double, or integer. A number literal can only represent byte numbers up to 2GB; use a string to specify larger amounts. If the storage path is specified without a storage quota, Chromium defaults to reserving 1GB plus 10% of the total size of the storage device.
This method takes effect when a new roHtmlWidget instance is created; it doesn't apply to the roHtmlWidget instance on which it is called.
Note | ||
---|---|---|
| ||
As of OS8, the |
SetWebDatabaseQuota(maximum As Dynamic) As Boolean
Sets the total size (in bytes) for all persistent HTML storage on the player. See the SetLocalStorageQuota()
entry above for details.
This method takes effect when a new roHtmlWidget instance is created; it doesn't apply to the roHtmlWidget instance on which it is called.
SetAppCacheSize(maximum As Integer) As Boolean
Sets the maximum size (in bytes) for the application cache. Changing the storage size of the application cache will clear the cache and rebuild the cache storage. Depending on database-specific attributes, you will only be able to set the size in units that are equal to the page size of the database, which is established at creation. These storage units will occur only in the following increments: 512, 1024, 2048, 4096, 8192, 16384, 32768.
EnableJavaScript(enable As Boolean) As Boolean
Enables/disables JavaScript on the widget. JavaScript is enabled by default.
AllowJavaScriptURLs(url_collection As roAssociativeArray)
Allows the specified JavaScript BrightScript classes to be used by the specified URLs (all BrightScript classes in JavaScript are disabled by default). This method accepts an associative array that maps JavaScript BrightScript classes to the URL(s) that are allowed to use them.
- An
all
key indicates that all classes are authorized for the associated URL(s). - An asterisk
"*"
value indicates that all URLs are authorized for the associated BrightScript class. - A
"local"
value indicates that all local pages are authorized for the associated BrightScript class.
The following will enable all BrightScript classes for all URLs:
Code Block |
---|
html.AllowJavaScriptUrls({ all: "*" }) |
The following will enable all BrightScript classes for local pages and the BrightSign homepage:
...
Boolean
Sets the screen orientation of content in the widget (note that the coordinates and dimensions of the roRectangle containing the widget are not affected by rotation). This method accepts the following strings:
"identity"
: There is no transform (i.e. the widget content is oriented as landscape). This is the default setting."rot90"
: The widget content is rotated to portrait at 90 degrees (clockwise)."rot270"
: The widget content is rotated to portrait at 270 degrees (counter-clockwise).
Note | ||
---|---|---|
| ||
The JavaScript |
SetAlpha(alpha As Integer) As Boolean
Sets the overall alpha level for the widget (the default equals 255).
SetVideoPlayerDefaults(defaults As roAssociativeArray) As Boolean
Sets default playback settings for <video>
elements in the widget. Available parameters are identical to the roVideoPlayer.PlayFile() method. Default settings will be overwritten by parameters specified in individual <video>
elements.
FlushCachedResources() As Boolean
Discards any resources that Chromium has cached in memory.
SetLocalStorageDir(file_path As String) As Boolean
Configures the HTML storage path. This method takes effect when a new roHtmlWidget instance is created; it doesn't apply to the roHtmlWidget instance on which it is called.
Note | ||
---|---|---|
| ||
As of OS8, the |
SetWebDatabaseDir(file_path As String) As Boolean
Configures the HTML storage path. See the SetLocalStorageDir()
entry above for details.
This method takes effect when a new roHtmlWidget instance is created; it doesn't apply to the roHtmlWidget instance on which it is called.
SetAppCacheDir(file_path As String) As Boolean
Anchor | ||||
---|---|---|---|---|
|
Configures the HTML storage path. See the SetLocalStorageDir()
entry above for details.
This method takes effect when a new roHtmlWidget instance is created; it doesn't apply to the roHtmlWidget instance on which it is called.
SetLocalStorageQuota(maximum As Dynamic) As Boolean
Sets the total size (in bytes) for all persistent HTML storage on the player. This method can accept a string, double, or integer. A number literal can only represent byte numbers up to 2GB; use a string to specify larger amounts. If the storage path is specified without a storage quota, Chromium defaults to reserving 1GB plus 10% of the total size of the storage device.
This method takes effect when a new roHtmlWidget instance is created; it doesn't apply to the roHtmlWidget instance on which it is called.
Note | ||
---|---|---|
| ||
As of OS8, the |
SetWebDatabaseQuota(maximum As Dynamic) As Boolean
Sets the total size (in bytes) for all persistent HTML storage on the player. See the SetLocalStorageQuota()
entry above for details.
This method takes effect when a new roHtmlWidget instance is created; it doesn't apply to the roHtmlWidget instance on which it is called.
SetAppCacheSize(maximum As Integer) As Boolean
Sets the maximum size (in bytes) for the application cache. Changing the storage size of the application cache will clear the cache and rebuild the cache storage. Depending on database-specific attributes, you will only be able to set the size in units that are equal to the page size of the database, which is established at creation. These storage units will occur only in the following increments: 512, 1024, 2048, 4096, 8192, 16384, 32768.
PostJSMessage(data As roAssociativeArray) As Boolean
...
Note | ||
---|---|---|
| ||
Changing the DOM is only possible at |
...
Enables the Chromium Inspector, which allows you to debug JavaScript applications while a webpage is running. To access the console, navigate to the player IP address at the specified port number. See this page for documentation relating to the JavaScript console.
SetUserAgent(user_agent As String) As Boolean
...
ready at |
GetUserAgent() As String
Returns the currently active user-agent string for the roHtmlWidget instance.
SetUserAgentSuffix(suffix As String) As Boolean
Appends text to the current user-agent string. Subsequent calls to this method will replace the suffix that was previously specified.
SetProxy(proxy as String) As Boolean
...
Allows the user to set up one or more proxies. If proxy pac files are included, this method must be used to specify authentication parameters.
ifMessagePort
SetPort(port As roMessagePort)
...