Skip to content

Commit

Permalink
Time source muxer for Cambiare.
Browse files Browse the repository at this point in the history
  • Loading branch information
PoneyClairDeLune committed Sep 26, 2023
1 parent 7551867 commit 1b4ba94
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions src/cambiare_demo/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,14 @@ HTMLElement.prototype.$a = function (selector) {
self.Alpine = Alpine;

let useMidiBus = false;
let audioFilePlayer = $e("#audioFilePlayer"),
visualizer = new Cambiare($e(".cambiare"), audioFilePlayer);
let audioFilePlayer = $e("#audioFilePlayer");
let timePlexer = {};
Object.defineProperty(timePlexer, "currentTime", {
get: () => {
return audioFilePlayer.currentTime || (Date.now() / 1000);
}
});
let visualizer = new Cambiare($e(".cambiare"), timePlexer);
visualizer.reset();

Alpine.store("play", "smf");
Expand Down

0 comments on commit 1b4ba94

Please sign in to comment.