-
Notifications
You must be signed in to change notification settings - Fork 22.4k
/
index.md
46 lines (32 loc) · 1.07 KB
/
index.md
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
---
title: "VTTCue: vertical property"
short-title: vertical
slug: Web/API/VTTCue/vertical
page-type: web-api-instance-property
browser-compat: api.VTTCue.vertical
---
{{APIRef("WebVTT")}}
The **`vertical`** property of the {{domxref("VTTCue")}} interface is a string representing the cue's writing direction.
## Value
A string containing one of the following values:
- `""` (an empty string)
- : Represents a horizontal writing direction.
- `"rl"`
- : Represents a vertical writing direction growing to the left.
- `"lr"`
- : Represents a vertical writing direction growing to the right.
## Examples
In the following example a new {{domxref("VTTCue")}} is created, then the value of `vertical` is set to `"rl"`. The value is then printed to the console.
```js
let video = document.querySelector("video");
let track = video.addTextTrack("captions", "Captions", "en");
track.mode = "showing";
let cue1 = new VTTCue(0, 0.9, "Hildy!");
cue1.vertical = "rl";
console.log(cue1.vertical);
track.addCue(cue1);
```
## Specifications
{{Specifications}}
## Browser compatibility
{{Compat}}