Skip to content

Commit f3066e0

Browse files
committed
updated Subtitles documentation
1 parent 083cf28 commit f3066e0

File tree

1 file changed

+19
-0
lines changed

1 file changed

+19
-0
lines changed

docs/plugins/subtitles.md

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -116,10 +116,29 @@ Subtitles.position('center', 'top')
116116
Subtitles.position(100, 100)
117117
```
118118

119+
### viewport
120+
121+
Sets the width and height for the viewport of the Subtitles text. The viewport is the area in which the Subtitles text will be displayed. By default, Subtitles assumes the viewport is the same size as the App. If your video player is smaller, you can set the viewport to match the size of the video player to correctly position the Subtitles text.
122+
123+
The first argument is the width of the viewport, the second argument is the height of the viewport.
124+
125+
126+
```js
127+
Subtitles.viewport(854, 480)
128+
```
129+
119130
### maxWidth
120131

121132
Sets the maximum width of the Subtitles text.
122133

123134
```js
124135
Subtitles.maxWidth(1200)
125136
```
137+
138+
### maxLines
139+
140+
Sets the maximum number of lines for the Subtitles text.
141+
142+
```js
143+
Subtitles.maxLines(2)
144+
```

0 commit comments

Comments
 (0)