ArtPromiseResult
Properties
| Name | Type | Description |
|---|---|---|
image | ?GdiBitmap | (or D2DBitmap if window.DrawMode == 1). Null on failure |
path | string | path to image file (or track file if image is embedded) |
Global functions, callbacks, types and values that are not members of a class, namespace or module.
| Name | Type | Description |
|---|---|---|
image | ?GdiBitmap | (or D2DBitmap if window.DrawMode == 1). Null on failure |
path | string | path to image file (or track file if image is embedded) |
Audio-stream descriptor returned by fb.GetAudioStreams.
| Name | Type | Description |
|---|---|---|
index | number | Zero-based stream index used by fb.SetAudioStream. |
info | FbFileInfo | Full metadata and technical information reported by the input decoder for this stream. |
default | boolean | True when this is the input decoder's default stream. |
selected | boolean | True when this is the effective selected stream. A saved user preference takes precedence over the decoder default. |
BroadcastChannelMessageCallback(event)
Callback used by onmessage and onmessageerror.
| Name | Type | Description |
|---|---|---|
event | MessageEvent | Broadcast message or reconstruction-error event. |
voidclearInterval(timerID)
| Name | Type | Description |
|---|---|---|
timerID | number |
clearTimeout(timerID)
| Name | Type | Description |
|---|---|---|
timerID | number |
Options used by d2d.StrokeStyle.
| Name | Type | Description |
|---|---|---|
startCap = CapStyle.Flatoptional | CapStyle | Cap at the start of an open stroke. |
endCap = CapStyle.Flatoptional | CapStyle | Cap at the end of an open stroke. |
dashCapoptional | CapStyle | Cap applied to each dash segment. If omitted, JSplitter uses CapStyle.Round for DashStyle.Dot, DashStyle.DashDot and DashStyle.DashDotDot so their zero-length dot segments are visible; other dash styles use CapStyle.Flat. An explicitly supplied dashCap is always used as-is. |
lineJoin = LineJoin.Miteroptional | LineJoin | Join used where consecutive line segments meet. |
miterLimit = 10optional | number | Positive miter limit used by miter-based joins. |
dashStyle = DashStyle.Solidoptional | DashStyle | Dash pattern. DashStyle.Custom requires a non-empty dashes array. |
dashOffset = 0optional | number | Offset into the dash sequence. |
dashesoptional | Array<number> | Custom dash lengths expressed as multiples of the stroke width. Supplying this array selects DashStyle.Custom automatically. |
Standard JavaScript error object thrown by JSplitter API methods. Catch it with a regular JavaScript try...catch statement.
| Name | Type | Description |
|---|---|---|
name | string | Error type name. |
message | string | Human-readable error message. |
stackoptional | string | JavaScript stack trace when available. |
include(path, options)
Evaluates JavaScript from a file in the current panel or Worker realm.
Similar to eval(utils.ReadTextFile(path)), but provides more features:
- Has include guards - a file is evaluated only once per realm unless always_evaluate is used.
- Panel-side includes also use compiled-script caching; Worker includes keep their own per-Worker include guard.
- Has better error reporting.
Relative filesystem paths are resolved as described in utils.ReadTextFile. The currently executing script file is tried first when available.
For a file-backed Worker, this makes its own directory the natural root for nested relative include calls.
Configured panel/package script roots are then considered where applicable.
${fb.ComponentPath} is the final fallback.
| Name | Type | Description |
|---|---|---|
path | string | Absolute or relative path to JavaScript file. |
options = undefinedoptional | object | |
options.always_evaluate = falseoptional | boolean | If true, evaluates the script even if it was included before. |
include('samples/complete/properties.js')
Return value of window.JsMemoryStats.
Panel scripts run on the main thread and share one SpiderMonkey heap. Per-panel heap usage is therefore not available. Native/external memory is tracked separately for the current panel. Each Worker has its own SpiderMonkey context and is reported separately in JsMemoryStats.Workers.
Related GC settings are under Advanced > JSplitter > Performance: restart is required > GC.
| Name | Type | Description |
|---|---|---|
MainThreadHeapUsage | number | SpiderMonkey heap usage shared by all JSplitter panel scripts running on the main thread (in bytes). The maximum is configured by Main thread maximum heap size (in MB); see MainThreadHeapLimit. Automatic GC based on heap growth is controlled by Heap growth before GC (in MB). |
MainThreadHeapLimit | number | Maximum SpiderMonkey heap size for main-thread panel scripts (in bytes). External memory does not count toward this limit. This value reflects Main thread maximum heap size (in MB). |
WorkerHeapLimit | number | Maximum SpiderMonkey heap size for each Worker (in bytes). The limit is shared as one setting value by all Workers, but applies independently to each Worker. This value reflects Worker maximum heap size (in MB, per Worker). |
CurrentPanelExternalUsage | number | Tracked native/external memory retained by the current panel (in bytes). This is an accounting estimate, not process working set or physical RAM/VRAM residency. Automatic GC based on external-memory growth is controlled by External memory growth before GC (in MB). |
Workers | JsWorkerMemoryStats[] | Memory snapshots for Workers created by the current panel. Worker snapshots are published by each Worker thread without blocking the panel and may lag while a Worker is executing a long-running task. |
Note: returned directories are not guaranteed to exist.
| Name | Type | Description |
|---|---|---|
Root | string | Root directory of the package |
Assets | string | Directory inside package folder that contains assets |
Scripts | string | Directory inside package folder that contains scripts |
Storage | string | Persistent and unique directory inside foobar2000 profile folder that can be used to store runtime data (e.g. cache) |
Return value of utils.GetPackageInfo.
| Name | Type | Description |
|---|---|---|
Version | string | Package version |
Directories | JsPackageDirs | Package directories |
Memory statistics for one Worker created by the current panel.
Related GC settings are under Advanced > JSplitter > Performance: restart is required > GC.
| Name | Type | Description |
|---|---|---|
Name | string | The Worker's immutable constructor name, identical to Worker-global self.name. The value is an empty string if no name was supplied. The same identity is used by unhandled Worker exception diagnostics, where an empty name is displayed as <unnamed>. |
HeapUsage | number | SpiderMonkey heap usage of this Worker (in bytes). The per-Worker heap limit is configured by Worker maximum heap size (in MB, per Worker); see JsMemoryStats.WorkerHeapLimit. Automatic GC based on heap growth is controlled by Heap growth before GC (in MB). |
ExternalUsage | number | Tracked native/external memory retained by this Worker (in bytes). This is an accounting estimate, not process working set or physical RAM/VRAM residency. Automatic GC based on external-memory growth is controlled by External memory growth before GC (in MB). |
Performance timeline entry created by performance.mark or performance.measure.
| Name | Type | Description |
|---|---|---|
entryType | string | Entry type. JSplitter currently supports "mark" and "measure". |
name | string | User-defined entry name. |
startTime | number | Start timestamp in milliseconds relative to performance.timeOrigin. |
duration | number | Entry duration in milliseconds. Always 0 for marks; for measures it is endTime - startTime and may be negative. |
detail | * | Optional metadata associated with the entry. Defaults to null. |
Options accepted by performance.mark.
| Name | Type | Description |
|---|---|---|
detail = nulloptional | * | Arbitrary metadata associated with the mark. |
startTimeoptional | number | Finite non-negative timestamp in milliseconds relative to performance.timeOrigin. Defaults to performance.now. |
Options accepted by the standard options form of performance.measure.
| Name | Type | Description |
|---|---|---|
detail = nulloptional | * | Arbitrary metadata associated with the measure. |
startoptional | (string|number) | Start mark name or finite non-negative timestamp in milliseconds. |
durationoptional | number | Finite non-negative duration in milliseconds. May be used together with start or end, but not together with both. |
endoptional | (string|number) | End mark name or finite non-negative timestamp in milliseconds. |
PerformanceObserverCallback(list, observer)
Callback invoked when observed performance entries are delivered.
| Name | Type | Description |
|---|---|---|
list | PerformanceObserverEntryList | Entries delivered in this callback. |
observer | PerformanceObserver | Observer receiving the entries. |
voidOptions accepted by PerformanceObserver.observe.
| Name | Type | Description |
|---|---|---|
entryTypesoptional | Array<string> | Entry types to observe. Unsupported types are ignored. Use either entryTypes or type for an observer, not both. |
typeoptional | string | A single entry type to observe. Unsupported types are ignored. Use either type or entryTypes for an observer, not both. |
Return value of window.ScriptInfo.
PackageId is only present when the panel script is an SMP package.
Path is always present. It contains the full native filesystem path of the panel's main script: the selected file for a File script, the sample file in the component folder for a Sample script, or the actual entry file for a package (main.js for an SMP package). For a script stored in panel memory, it is an empty string. This is a filesystem path, not a file URL. The value always identifies the main script, including when read from an included file or an imported module. Relative filesystem paths used by supported methods are resolved from the calling file as described in utils.ReadTextFile; they do not necessarily use the directory of Path.
| Name | Type | Description |
|---|---|---|
Name | string | |
Path | string | Full native filesystem path of the main script, or an empty string for an in-memory script. |
Authoroptional | string | |
Versionoptional | string | |
PackageIdoptional | string |
setInterval(func, delay, ...func_args)
| Name | Type | Description |
|---|---|---|
func | function() | |
delay | number | |
func_args | ...* |
numbersetTimeout(func, delay, ...func_args)
| Name | Type | Description |
|---|---|---|
func | function() | |
delay | number | |
func_args | ...* |
numberSystem-information snapshot returned by utils.SystemInfo.
| Name | Type | Description |
|---|---|---|
OS | string | Human-readable Windows product name including the edition when available, for example Windows 11 Home or Windows 11 Pro. |
Build | number | Windows NT build number. |
IsOS64Bit | boolean | True when the operating system architecture is 64-bit. This describes Windows itself, not the foobar2000 process architecture. |
RAM | SystemMemoryInfo | Physical-memory and foobar2000 private-working-set information. |
VRAM | SystemVideoMemoryInfo|null | Dedicated/local video-memory information for the selected graphics adapter, or null when the required video-memory query interface is unavailable. |
Physical-memory information returned in utils.SystemInfo.
| Name | Type | Description |
|---|---|---|
Total | number | Total physical memory visible to Windows, in bytes. This can be lower than the installed RAM amount because hardware-reserved memory is not included. |
Available | number | Physical memory currently available to the system, in bytes. This is Windows' available-memory value and includes reclaimable standby/cache memory; it is more useful for capacity decisions than strictly free pages. |
Process | number | Private working set of the foobar2000 process, in bytes. This corresponds closely to the Memory (active private working set) value shown for foobar2000 in Windows Task Manager. |
Dedicated/local video-memory information returned in utils.SystemInfo.
The selected adapter is the adapter on which the foobar2000 process currently has the highest local video-memory usage. If the process has no local video-memory usage yet, the adapter with the largest dedicated-memory size is selected instead.
| Name | Type | Description |
|---|---|---|
Adapter | string | Display name of the selected graphics adapter. |
Total | number|null | Dedicated video-memory size of the selected adapter, in bytes. On 32-bit builds JSplitter avoids returning a truncated 32-bit value; if a safe 64-bit total cannot be obtained, this field is null. |
ProcessBudget | number | Current local video-memory budget assigned to the foobar2000 process by Windows, in bytes. The budget is dynamic and is not a fixed hardware limit. |
Process | number | Current local video-memory usage attributed to the foobar2000 process, in bytes. |
Frozen array of entry types supported by PerformanceObserver.
JSplitter currently returns ["mark", "measure"]. Repeated reads return the same frozen array object.
WorkerErrorCallback(event)
Callback used for Worker error handlers.
| Name | Type | Description |
|---|---|---|
event | ErrorEvent |
voidWorkerMessageCallback(event)
Callback used for Worker message and messageerror handlers.
| Name | Type | Description |
|---|---|---|
event | MessageEvent |
voidWorkerPromiseRejectionCallback(event)
Callback used for Worker Promise rejection handlers.
| Name | Type | Description |
|---|---|---|
event | PromiseRejectionEvent |
void