-
Notifications
You must be signed in to change notification settings - Fork 115
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
AVWave wrong slider positioning on short audio #132
Comments
Hello, thanks for reporting this. |
@actorius |
Hello! Sound just a blob from MediaRecorder. Here few short .weba records in ZIP (playable from browser) <script setup lang="ts">
import { onMounted, ref } from 'vue';
import { useAVWaveform } from 'vue-audio-visual'
const props = defineProps({src: Blob})
const player = ref(null);
const canvas = ref(null);
const isPlay = ref(false);
const url = URL.createObjectURL(props.src);
useAVWaveform(player, canvas, {
src: url,
canvHeight: 40, canvWidth: 200,
playedLineColor: "#777",
playtimeWithMs: false,
playtimeSlider:false,
})
var stream;
function handlePlayToggleBtnClick() {
console.log(player.value);
player.value.load();
if (player.value.paused) {
player.value.play();
} else {
player.value.pause();
}
}
</script>
<template>
<div>
<div class="audio-box">
<audio ref="player" :src="url"
@ended="()=> isPlay = false"
@pause="()=> isPlay = false"
@play="()=> isPlay = true"
/>
<span>
<button @click="handlePlayToggleBtnClick" class="btn-toggle-play">
<span v-if="!isPlay"><i class="fa-solid fa-play" ></i></span>
<span v-if="isPlay"><i class="fa-solid fa-pause"></i></span>
</button>
</span>
<canvas ref="canvas" />
</div>
</div>
</template>
<style scoped></style>
|
Hi @actorius the duration with weba is wrong. And it seems to be a problem with "weba" format. I did not observed the problem with wav or mp3 files. I will try to see if it is possible to have a patch to fix it |
@actorius there is a new version with a patch to fix it. Let me know if it works for you. |
Thx! |
Hello!
Thx for creating this plugin!
I found problem with short audio records.
Slider do not go to end on short audio, you can see below on screenshot how its look on different records
The text was updated successfully, but these errors were encountered: