···123123 * To disable video autoplay, the autoplay attribute needs to be removed altogether as this attribute. Setting autoplay="false" will not work; the video will autoplay if the attribute is there in the <stream> tag.
124124 *
125125 * In addition, some browsers now prevent videos with audio from playing automatically. You may add the mute attribute to allow your videos to autoplay. For more information, [go here](https://webkit.org/blog/6784/new-video-policies-for-ios/).
126126+ *
127127+ * @default false
126128 */
127127- autoplay: { type: Boolean },
129129+ autoplay: { type: Boolean, default: false },
128130 /**
129131 * Shows the default video controls such as buttons for play/pause, volume controls. You may choose to build buttons and controls that work with the player.
132132+ *
133133+ * @default false
130134 */
131131- controls: { type: Boolean },
135135+ controls: { type: Boolean, default: false },
132136 /**
133137 * Returns the current playback time in seconds. Setting this value seeks the video to a new time.
138138+ *
139139+ * @default 0
134140 */
135135- currentTime: { type: Number },
141141+ currentTime: { type: Number, default: 0 },
136142 /**
137143 * The height of the video’s display area, in CSS pixels.
138144 */
···143149 width: { type: [String, Number] },
144150 /**
145151 * A Boolean attribute which indicates the default setting of the audio contained in the video. If set, the audio will be initially silenced.
152152+ *
153153+ * @default false
146154 */
147147- muted: { type: Boolean },
155155+ muted: { type: Boolean, default: false },
148156 /**
149157 * A Boolean attribute; if included the player will automatically seek back to the start upon reaching the end of the video.
158158+ *
159159+ * @default false
150160 */
151151- loop: { type: Boolean },
161161+ loop: { type: Boolean, default: false },
152162 /**
153163 * This enumerated attribute is intended to provide a hint to the browser about what the author thinks will lead to the best user experience. You may choose to include this attribute as a boolean attribute without a value, or you may specify the value preload="auto" to preload the beginning of the video. Not including the attribute or using preload="metadata" will just load the metadata needed to start video playback when requested.
154164 *
···163173 },
164174 /**
165175 * Sets volume from 0.0 (silent) to 1.0 (maximum value)
176176+ *
177177+ * @default 1
166178 */
167167- volume: { type: Number },
179179+ volume: { type: Number, default: 1 },
168180 },
169181 inheritAttrs: false,
170182 data: () => ({
···177189 beforeMount() {
178190 ;(this as any).initialiseStream()
179191 },
192192+ watch: [
193193+ 'autoplay',
194194+ 'controls',
195195+ 'currentTime',
196196+ 'muted',
197197+ 'loop',
198198+ 'volume',
199199+ 'preload',
200200+ ].reduce((obj, prop) => {
201201+ obj[prop] = function (
202202+ this: { updateProp: (key: string, value: any) => void },
203203+ val: any
204204+ ) {
205205+ this.updateProp(prop, val)
206206+ }
207207+ return obj
208208+ }, {} as Record<string, any>),
180209 methods: {
210210+ updateProp(key: string, value: any) {
211211+ if (!this.$refs.stream) return
212212+ ;(this.$refs.stream as any)[key] = value
213213+ },
181214 initialiseStream() {
182215 if (!this.streamScript) {
183216 const streamScript = document.createElement('script')
···225258 'none',
226259 },
227260 on: this.$listeners,
261261+ ref: 'stream',
228262 }),
229263 ]
230264 )