codekraft-studio / vue-record

VueJs components for MediaRecorder API
https://codekraft-studio.github.io/vue-record/
MIT License
95 stars 57 forks source link

AudioContext started to soon #11

Open wscheffer opened 4 years ago

wscheffer commented 4 years ago

image

Any change we can only run connection to the audio context during mount of the component?

b4dnewz commented 4 years ago

I can confirm the issue, it's related to this package we use that is actually archived and I guess outdated..

I will find a possible substitution.

Edit: @lidio601 can you help me with this? i'm not familiar with tonejs

b4dnewz commented 4 years ago

this package can be used instead, to reduce the amount of code and make it work on all browsers

Alakar-Nallavan commented 4 years ago

Description

I am using this Component in Nuxt.js.It working Perfectly.But it will gives autoplay warning always,

Steps to reproduce

Tone.js Autoplay Policy issue

Results

Expected

Record Audoi from web through Nuxt.js

Actual

functionally working but it rise warnings exponentially

Error output

image

Additional Information

pls fix this issue or other wise give the alternate solution for that

versions

vue-record

"@codekraft-studio/vue-record": "0.0.3"

Tone.js

Tone.js v13.8.25

browsers

Chrome Version 81.0.4044.122 (Official Build) (64-bit) platforms (Windows 10,node v10.16.0) are affected.

jetchoong-dev commented 4 years ago

version - 0.0.3 Am having the exact same issue as well, and it seems to be a random issue, consistent though. Can anyone help to fix this? Appreciate that.

ankittaneja commented 4 years ago

Hello Everyone, facing the same issue here. When do you think you guys can fix it? Is there a workaround in place? I found this StacKOverflow article which might be useful in resolving the issue.

LuisDavidPadron commented 3 years ago

hello i been stoped, or any show 4 times maximum these warnings. i'm modify function inside project in file: VueRecord.umd.js these function StartAudioContext for these, and add context.resume(). Code: ` function StartAudioContext(context, elements, callback) {

context = new AudioContext();

context.resume().then(() => {
  var promise = new Promise(function(success) {
    onStarted(context, success)
  })

  // The TapListeners bound to the elements
  var tapListeners = []
  // add all the tap listeners
  if (!elements){
    elements = document.body
  }

  bindTapListener(elements, tapListeners, context)
  //dispose all these tap listeners when the context is started
  promise.then(function(){
    for (var i = 0; i < tapListeners.length; i++){
      tapListeners[i].dispose()
    }

    tapListeners = null

    if (callback){
      callback()
    }
  })

  return promise
});`

After this only show message with only few times, max 10 times. If that speak in another question need put in specific place execute promise context.resume().

Sorry for my code, i'dont know paste correctly in code mode, is my first time :) Captura de pantalla 2020-12-08 040949

LuisDavidPadron commented 3 years ago

I have the solution in a fork with this proyect. The problem is in https://github.com/tambien/StartAudioContext, need add context.resume, for not get exponentials warning.

SergejSi commented 3 years ago

The error/warning is still there. I have tried the above solution, but it seem not to solve the problem.

Bildschirmfoto 2021-02-02 um 12 05 16
VIRGO96 commented 3 years ago

Was anyone able to solve this its running and I think consuming memory too ? @LuisDavidPadron @SergejSi

VIRGO96 commented 3 years ago

version - 0.0.3 Am having the exact same issue as well, and it seems to be a random issue, consistent though. Can anyone help to fix this? Appreciate that.

did you find anything on this ?

derakhshanfar commented 3 years ago

any solution guys?

derakhshanfar commented 3 years ago

https://github.com/codekraft-studio/vue-record/issues/30 duplicate issue

derakhshanfar commented 3 years ago

https://github.com/Tonejs/Tone.js/issues/341 also it might help you

VIRGO96 commented 3 years ago

@derakhshanfar i have started to live this issue thanks for letting me know can you pinpoint which was the thing that solved it there are too much stuff in the thread you shared would appreciated if you can just post the snippet or process that solved it