Skip to content
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

AudioContext started to soon #11

Open
wscheffer opened this issue Mar 20, 2020 · 14 comments
Open

AudioContext started to soon #11

wscheffer opened this issue Mar 20, 2020 · 14 comments
Labels
bug Something isn't working help wanted Extra attention is needed

Comments

@wscheffer
Copy link

image

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

@b4dnewz b4dnewz added the bug Something isn't working label Apr 28, 2020
@b4dnewz
Copy link
Member

b4dnewz commented Apr 28, 2020

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
Copy link
Member

b4dnewz commented Apr 28, 2020

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

@b4dnewz b4dnewz added the help wanted Extra attention is needed label Apr 28, 2020
@Alakar-Nallavan
Copy link

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

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

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

LuisDavidPadron commented Dec 8, 2020

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

LuisDavidPadron commented Dec 9, 2020

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

SergejSi commented Feb 2, 2021

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

VIRGO96 commented Feb 23, 2021

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

@VIRGO96
Copy link

VIRGO96 commented Feb 23, 2021

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

any solution guys?

@derakhshanfar
Copy link

#30 duplicate issue

@derakhshanfar
Copy link

Tonejs/Tone.js#341 also it might help you

@VIRGO96
Copy link

VIRGO96 commented Jul 6, 2021

@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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

9 participants