VttRegion Class

A WebVTT region (https://w3c.github.io/webvtt/#the-vttregion-interface): a part of the video viewport in which the cues of the region are rendered.

public sealed class VttRegion

Constructors

NameDescription
VttRegion()Creates a region (https://w3c.github.io/webvtt/#dom-vttregion-vttregion).

VttRegion()

VttRegion.cs

Creates a region (https://w3c.github.io/webvtt/#dom-vttregion-vttregion).

public VttRegion()

Properties

NameDescription
IdGets or sets the identifier of the region (https://w3c.github.io/webvtt/#dom-vttregion-id).
LinesGets or sets the height of the region, a number of lines (https://w3c.github.io/webvtt/#dom-vttregion-lines).
RegionAnchorXGets or sets the horizontal offset of the anchor of the region, a percentage of its width (https://w3c.github.io/webvtt/#dom-vttregion-regionanchorx).
RegionAnchorYGets or sets the vertical offset of the anchor of the region, a percentage of its height (https://w3c.github.io/webvtt/#dom-vttregion-regionanchory).
ScrollGets or sets the scroll setting of the region (https://w3c.github.io/webvtt/#dom-vttregion-scroll).
ViewportAnchorXGets or sets the horizontal offset of the anchor of the region in the video viewport, a percentage of the width of the video (https://w3c.github.io/webvtt/#dom-vttregion-viewportanchorx).
ViewportAnchorYGets or sets the vertical offset of the anchor of the region in the video viewport, a percentage of the height of the video (https://w3c.github.io/webvtt/#dom-vttregion-viewportanchory).
WidthGets or sets the width of the region, a percentage of the width of the video (https://w3c.github.io/webvtt/#dom-vttregion-width).

Gets or sets the identifier of the region (https://w3c.github.io/webvtt/#dom-vttregion-id).

public string Id { get; set; }

Gets or sets the height of the region, a number of lines (https://w3c.github.io/webvtt/#dom-vttregion-lines).

public uint Lines { get; set; }

RegionAnchorX

VttRegion.cs

Gets or sets the horizontal offset of the anchor of the region, a percentage of its width (https://w3c.github.io/webvtt/#dom-vttregion-regionanchorx).

public double RegionAnchorX { get; set; }

Property value

double

Exceptions

DomException
An IndexSizeError when the value is negative or greater than 100.

See also

RegionAnchorY

VttRegion.cs

Gets or sets the vertical offset of the anchor of the region, a percentage of its height (https://w3c.github.io/webvtt/#dom-vttregion-regionanchory).

public double RegionAnchorY { get; set; }

Property value

double

Exceptions

DomException
An IndexSizeError when the value is negative or greater than 100.

See also

Gets or sets the scroll setting of the region (https://w3c.github.io/webvtt/#dom-vttregion-scroll).

public ScrollSetting Scroll { get; set; }

ViewportAnchorX

VttRegion.cs

Gets or sets the horizontal offset of the anchor of the region in the video viewport, a percentage of the width of the video (https://w3c.github.io/webvtt/#dom-vttregion-viewportanchorx).

public double ViewportAnchorX { get; set; }

Property value

double

Exceptions

DomException
An IndexSizeError when the value is negative or greater than 100.

See also

ViewportAnchorY

VttRegion.cs

Gets or sets the vertical offset of the anchor of the region in the video viewport, a percentage of the height of the video (https://w3c.github.io/webvtt/#dom-vttregion-viewportanchory).

public double ViewportAnchorY { get; set; }

Property value

double

Exceptions

DomException
An IndexSizeError when the value is negative or greater than 100.

See also

Gets or sets the width of the region, a percentage of the width of the video (https://w3c.github.io/webvtt/#dom-vttregion-width).

public double Width { get; set; }

Property value

double

Exceptions

DomException
An IndexSizeError when the value is negative or greater than 100.

See also