Skip to content

Commit

Permalink
Update dittytoyJukebox.js
Browse files Browse the repository at this point in the history
  • Loading branch information
reindernijhoff committed Mar 27, 2024
1 parent 3de45bb commit d21fcd0
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions example/src/dittytoyJukebox.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,13 +20,12 @@ export default class DittytoyJukebox {
constructor() {
this.dittytoy = new Dittytoy();
initDittytoyMediaSession(this.dittytoy, () => this.prev(), () => this.next());
this.visualiser = new DittytoyVisualiser(this.dittytoy);
new DittytoyVisualiser(this.dittytoy);

this.ditties = [];
this.ditty = null;
this.index = 0;

this.ditties = [];

this.fetchDitties().then(async () => {
const dittyId = window.location.hash?.slice(1) || '24373308b4';
await this.fetchDitty(dittyId);
Expand Down Expand Up @@ -87,7 +86,6 @@ export default class DittytoyJukebox {

async fetchDitty(id) {
await this.dittytoy.stop();
this.paused = 2;
this.updateUI();

this.ditty = await fetch(`https://dittytoy.net/api/v1/ditty/${id}/`).then(e => e.json()).then(ditty => {
Expand Down

0 comments on commit d21fcd0

Please sign in to comment.