Skip to content

Commit 7cdcb74

Browse files
authored
Updated Readme (thanks #3)
Showing the API methods
1 parent f93b3c1 commit 7cdcb74

File tree

1 file changed

+11
-1
lines changed

1 file changed

+11
-1
lines changed

README.md

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@ To make it work you need at least `src, res, autoplay`.
102102

103103
- `autoplay` (default: `true`)
104104

105-
The video is going to be played immediately when the video is ready. If you are setting it to false, you can start the video just by `this.$refs.videobackground.player.play()`. But remember to set `ref=videobackground` to the html tag `<video-background>`, so that it can work.
105+
The video is going to be played immediately when the video is ready. If you are setting it to false, you can start the video just by `this.$refs.videobackground.player.play()`. But remember to set `ref=videobackground` to the HTML tag `<video-background>`, so that it can work.
106106

107107
- `overlay` (default: `''`)
108108
If you love overlays, then copy the overlay from the advanced example.
@@ -135,6 +135,16 @@ This is important, if you know that you might have users with bad internet speed
135135
- `loading`: Video is loading
136136
- `ended`: Video finished, only when `loop` is set to false
137137

138+
## Methods
139+
140+
If you happen to need more control over the player, you can use the internal methods. For that, you need to set `ref=videobackground` to the HTML tag `<video-background>`. After that you can call all methods like this `this.$refs.videobackground.player.play()`.
141+
142+
- `play()`: Video is playing
143+
- `pause()`: Video is paused
144+
- `show()`: Video is shown
145+
- `hide()`: Video is hidden, the poster is shown
146+
- `load()`: Video is loaded
147+
138148

139149
## Security
140150

0 commit comments

Comments
 (0)