Coder Social home page Coder Social logo

Comments (7)

staskobzar avatar staskobzar commented on July 21, 2024 1

Hello, thanks for reporting this.
Will try to fix it as soon as I have time.

from vue-audio-visual.

staskobzar avatar staskobzar commented on July 21, 2024 1

Hi @actorius
Thanks for the details and for the sample. Finally, I do see the problem with the sample weba file.
The problem, actually, appears on the audio buffer load here : https://github.com/staskobzar/vue-audio-visual/blob/master/src/composables/useAVWaveform.ts#L112

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

from vue-audio-visual.

actorius avatar actorius commented on July 21, 2024 1

Hello!
My apologies for long answer time.
I'm tested plugin, now bug it's not reploduced.
Issue can be closed. Thx!
image

from vue-audio-visual.

staskobzar avatar staskobzar commented on July 21, 2024

@actorius
I can not re-create the problem with my short examples.
Can you send me you sound example and a code example you use to set AVWave plugin?
Thanks

from vue-audio-visual.

actorius avatar actorius commented on July 21, 2024

Hello!

Sound just a blob from MediaRecorder. Here few short .weba records in ZIP (playable from browser)
Downloads.zip

<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>

from vue-audio-visual.

staskobzar avatar staskobzar commented on July 21, 2024

@actorius there is a new version with a patch to fix it. Let me know if it works for you.

from vue-audio-visual.

actorius avatar actorius commented on July 21, 2024

Thx!
I'll try new plugin on a days.
Give feedback about changes later

from vue-audio-visual.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.