Skip to content

Commit 28e9cf8

Browse files
committed
Added few methods to subtitle plugin
1 parent 8f27ed7 commit 28e9cf8

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

src/Subtitles/index.js

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,22 @@ export default {
8181
subtitles.viewportW = w
8282
subtitles.viewportH = h
8383
},
84+
viewportW(w) {
85+
const subtitles = getOrCreateSubtitlesComponent()
86+
subtitles.viewportW = w
87+
},
88+
viewportH(h) {
89+
const subtitles = getOrCreateSubtitlesComponent()
90+
subtitles.viewportH = h
91+
},
92+
xPos(v) {
93+
const subtitles = getOrCreateSubtitlesComponent()
94+
subtitles.xPos = v
95+
},
96+
yPos(v) {
97+
const subtitles = getOrCreateSubtitlesComponent()
98+
subtitles.yPos = v
99+
},
84100
position(x, y) {
85101
const subtitles = getOrCreateSubtitlesComponent()
86102
subtitles.xPos = x

0 commit comments

Comments
 (0)