@mindedge/vuetify-player 0.4.7 → 0.4.9
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.
package/package.json
CHANGED
|
@@ -65,6 +65,7 @@
|
|
|
65
65
|
@abort="$emit('abort', $event)"
|
|
66
66
|
@focusin="$emit('focusin', $event)"
|
|
67
67
|
@focusout="$emit('focusout', $event)"
|
|
68
|
+
@ratechange="onPlayerSpeedChange"
|
|
68
69
|
>
|
|
69
70
|
<source
|
|
70
71
|
v-for="(source, index) of current.sources"
|
|
@@ -1010,6 +1011,19 @@ export default {
|
|
|
1010
1011
|
}
|
|
1011
1012
|
}
|
|
1012
1013
|
},
|
|
1014
|
+
onPlayerSpeedChange(e) {
|
|
1015
|
+
// If the player set its own playback rate (like during reloads) then we need to re-set it to the pre-chosen value
|
|
1016
|
+
// The below checks if there's a mismatch between the player and what we set the current rate to be
|
|
1017
|
+
if (
|
|
1018
|
+
e &&
|
|
1019
|
+
e.target &&
|
|
1020
|
+
e.target.playbackRate &&
|
|
1021
|
+
e.target.playbackRate !==
|
|
1022
|
+
this.attributes.playbackrates[this.state.playbackRateIndex]
|
|
1023
|
+
) {
|
|
1024
|
+
this.onPlaybackSpeedChange(this.state.playbackRateIndex)
|
|
1025
|
+
}
|
|
1026
|
+
},
|
|
1013
1027
|
onPlaybackSpeedChange(index) {
|
|
1014
1028
|
this.player.playbackRate = this.attributes.playbackrates[index]
|
|
1015
1029
|
this.state.playbackRateIndex = index
|
|
@@ -543,6 +543,10 @@ export default {
|
|
|
543
543
|
}
|
|
544
544
|
},
|
|
545
545
|
onKeydown(e) {
|
|
546
|
+
// prevent tab trap
|
|
547
|
+
if (e.code.toLowerCase() === 'tab') {
|
|
548
|
+
return
|
|
549
|
+
}
|
|
546
550
|
// Only process keyboard events if the media is focused
|
|
547
551
|
// This is just in case the media lost focus but the event listener wasn't removed for some reason
|
|
548
552
|
if (this.mediaFocus) {
|