Namespace: SpawnDev.SpawnJS.JSObjects
Source: JSObjects/AllocationSizeOptions.cs
MDN Reference: AllocationSizeOptions on MDN
VideoFrame.AllocationSize() options https://developer.mozilla.org/en-US/docs/Web/API/VideoFrame/allocationSize#options
| Property | Type | Access | Description |
|---|---|---|---|
AllocationSizeOptions |
class |
get | VideoFrame.AllocationSize() options https://developer.mozilla.org/en-US/docs/Web/API/VideoFrame/allocationSize#options |
Layout |
List<VideoFrameLayout>? |
get |
SpawnDev.SpawnJS Mapping Note: The JavaScript examples below show the standard Web API usage. In SpawnDev.SpawnJS, the same API is available with C# conventions:
- Properties and methods use PascalCase (e.g.,
readyStatebecomesReadyState)- Events use ActionEvent with
+=/-=(e.g.,addEventListener("click", fn)becomesOnClick += handler)- Async methods return
Task<T>instead ofPromise<T>- Objects should be disposed with
usingstatements- Access via
JS.Get<AllocationSizeOptions>(...)or constructornew AllocationSizeOptions(...)
const videoRect = {
x: 0,
y: 0,
width: 800,
height: 600,
};
let size = VideoFrame.allocationSize({ rect: videoRect });