Closed luisarandas closed 5 years ago
Fairly certain AudioContexts are window-scoped, so persisting across page-loads is a no-go. You could use a SPA framework with a router (react and react-router) to give the illusion that the AudioContext is persisting across different pages.
Is there any link you might find useful?
Check out: https://reacttraining.com/react-router/
If you are unfamiliar with React, look through their docs to get a sense for how the framework abstracts HTML and DOM interaction.
If you're interested in sharing data between tabs / windows, there's the new BroadcastChannel API (MDN docs: https://mzl.la/2A2NOYe). You could theoretically broadcast a buffer array or an object reference, but AudioContexts are still intentionally isolated.
Thank you very much. Best, Luis
Suggest the create-react-app npm package.
$ npm install -g create-react-app
$ create-react-app my-app
On Sun, Dec 16, 2018, 10:42 AM luisArandas <notifications@github.com wrote:
Thank you very much. Best, Luis
— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/Tonejs/Tone.js/issues/412#issuecomment-447657514, or mute the thread https://github.com/notifications/unsubscribe-auth/AC7ifyGMfP09cyR__dWz_5lZNeQpT42fks5u5ngQgaJpZM4ZVUDA .
as @spencerudnick mentioned, the AudioContext is window specific and there is no built-in Web Audio way pass audio from one page to another. Might be something you can do with WebRTC?
Is there a way to send Tone.Master from current page to another context -> for example page2.html ? Best, Luis