DEV Community

Discussion on: A simple audio sequencer using Web Audio Api & Angular

elasticrash profile image
Stefanos Kouroupis Author • Edited on

mind you it's not exactly the same, but nearly 90% similar

as bonus I updated it to angular 8 (from 6)

mahen23 profile image
EDGE Neural Networks

I've never seen this line before:

new (window['AudioContext'] || window['webkitAudioContext'])();

Can you please expand more on how to access HTML5 apis via Angular ? We've been trying to use filesystem api via NodeJS and its quite painful, especially through electron. Thanks.

Thread Thread
elasticrash profile image
Stefanos Kouroupis Author • Edited on

That line is nothing more, than basic backward compatibility with the older implementation of the AudioContext. The web Audio standard was first implemented in webkit under the official specifications. New implementations follow specifications to the letter.

Basically whichever of those two evaluates to true, gets used.

I've never done any electron work, but as far as I know its a combination of nodejs and the Chromium engine.

how can you access the window object though through electron is beyond me. A quick search came back with the following

let myWindow = new BrowserWindow(params);
    .then(result => console.log(result));