fix volume actually not getting animated

This commit is contained in:
Tomáš Mládek 2020-01-12 21:10:14 +01:00
parent 336a637b9f
commit e5b5ba12e0
2 changed files with 3 additions and 2 deletions

View file

@ -2,7 +2,7 @@
<div :class="['channel', `channel-${loadingState}`]">
<div class="name">{{name}}</div>
<VolumeSlider :value="volume" :disabled="loadingState === 'unloaded'"
@maxValueChange="(actualValue) => {actualVolume = actualValue}"/>
@valueChange="(actualValue) => {actualVolume = actualValue}"/>
<div class="title">{{loadingState === "loading" ? "Loading..." : title}}</div>
<div class="youtube-player" ref="ytpl"/>
</div>

View file

@ -22,9 +22,10 @@ export default class Channel extends Vue {
this.onMaxValueChange();
}
@Watch("value")
@Watch("maxValue")
private onMaxValueChange() {
this.$emit("maxValueChange", this.value * (this.maxValue / 100), this.maxValue);
this.$emit("valueChange", this.value * (this.maxValue / 100), this.maxValue);
}
};
</script>