Skip to content
Snippets Groups Projects
Commit cd182a18 authored by Elmar Ludwig's avatar Elmar Ludwig
Browse files

update displayed duration on durationchange, not on load, fixes #3087

Closes #3087

Merge request studip/studip!2072
parent b742d300
No related branches found
No related tags found
No related merge requests found
...@@ -16,7 +16,7 @@ ...@@ -16,7 +16,7 @@
class="cw-audio-player" class="cw-audio-player"
ref="audio" ref="audio"
@timeupdate="onTimeUpdateListener" @timeupdate="onTimeUpdateListener"
@loadeddata="setDuration" @durationchange="setDuration"
@ended="onEndedListener" @ended="onEndedListener"
/> />
<div v-if="!emptyAudio" class="cw-audio-container"> <div v-if="!emptyAudio" class="cw-audio-container">
...@@ -464,9 +464,6 @@ export default { ...@@ -464,9 +464,6 @@ export default {
}, },
onTimeUpdateListener() { onTimeUpdateListener() {
this.currentSeconds = this.$refs.audio.currentTime; this.currentSeconds = this.$refs.audio.currentTime;
if (this.durationSeconds === 0) {
this.setDuration();
}
}, },
onEndedListener() { onEndedListener() {
this.stopAudio(); this.stopAudio();
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment