@mpxjs/webpack-plugin 2.10.13-beta.1 → 2.10.13-beta.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -56,7 +56,19 @@
|
|
|
56
56
|
if (val !== -1) this.setSelectionRange(undefined, val)
|
|
57
57
|
},
|
|
58
58
|
immediate: true
|
|
59
|
-
}
|
|
59
|
+
},
|
|
60
|
+
focus (val) {
|
|
61
|
+
if (val) {
|
|
62
|
+
this.$nextTick(() => {
|
|
63
|
+
this.$refs.input.focus()
|
|
64
|
+
})
|
|
65
|
+
} else {
|
|
66
|
+
this.$nextTick(() => {
|
|
67
|
+
this.$refs.input.blur()
|
|
68
|
+
})
|
|
69
|
+
}
|
|
70
|
+
},
|
|
71
|
+
immediate: true
|
|
60
72
|
},
|
|
61
73
|
render (createElement) {
|
|
62
74
|
const mergeBefore = {
|
|
@@ -148,6 +148,11 @@
|
|
|
148
148
|
},
|
|
149
149
|
controls: function (show) {
|
|
150
150
|
this.$emit('controlstoggle', inheritEvent('controlstoggle', {}, { show }))
|
|
151
|
+
},
|
|
152
|
+
objectFit (val) {
|
|
153
|
+
if (this._player && this._player.video) {
|
|
154
|
+
this._player.video.style.objectFit = val
|
|
155
|
+
}
|
|
151
156
|
}
|
|
152
157
|
},
|
|
153
158
|
mounted () {
|
|
@@ -189,6 +194,9 @@
|
|
|
189
194
|
if (this.initialTime) {
|
|
190
195
|
this._player.seek(this.initialTime)
|
|
191
196
|
}
|
|
197
|
+
if (this.objectFit) {
|
|
198
|
+
this._player.video.style.objectFit = this.objectFit
|
|
199
|
+
}
|
|
192
200
|
},
|
|
193
201
|
initStyle () {
|
|
194
202
|
|
|
@@ -239,7 +247,10 @@
|
|
|
239
247
|
|
|
240
248
|
this._player.on('progress', (e) => {
|
|
241
249
|
const eNode = e.target
|
|
242
|
-
|
|
250
|
+
let buffered = 0
|
|
251
|
+
if (eNode?.buffered && eNode.buffered.length > 0) {
|
|
252
|
+
buffered = (eNode.buffered.end(0)) / (eNode?.duration)
|
|
253
|
+
}
|
|
243
254
|
this.$emit('progress', inheritEvent('progress', e, { buffered: buffered * 100 }))
|
|
244
255
|
})
|
|
245
256
|
|