A music player that connects to your cloud/distributed storage.
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

It might be time for Typescript

+6 -6
+2 -2
src/Javascript/Brain/user.js
··· 8 8 import * as db from "../indexed-db.js" 9 9 10 10 import { SECRET_KEY_LOCATION } from "./common.js" 11 - import { decryptIfNeeded, encryptWithSecretKey, fromCache, removeCache } from "./common.js" 12 - import { reportError, sendJsonData, storageCallback, toCache } from "./common.js" 11 + import { decryptIfNeeded, encryptWithSecretKey, fromCache, identity } from "./common.js" 12 + import { removeCache, reportError, sendJsonData, storageCallback, toCache } from "./common.js" 13 13 14 14 15 15 const ports = []
+4 -4
src/Javascript/audio-engine.js
··· 194 194 audioNode.context.connect(volume) 195 195 196 196 if (audioNode.readyState >= 4) { 197 - playAudio(audioNode, queueItem) 197 + playAudio(audioNode, queueItem, orchestrion.app) 198 198 } else { 199 199 orchestrion.app.ports.setAudioIsLoading.send(true) 200 200 audioNode.load() ··· 369 369 370 370 function audioEndEvent(event) { 371 371 if (this.repeat) { 372 - playAudio(event.target, this.activeQueueItem) 372 + playAudio(event.target, this.activeQueueItem, this.app) 373 373 } else { 374 374 this.app.ports.noteProgress.send({ trackId: this.activeQueueItem.trackId, progress: 1 }) 375 375 this.app.ports.activeQueueItemEnded.send(null) ··· 394 394 clearTimeout(this.loadingTimeoutId) 395 395 this.app.ports.setAudioHasStalled.send(false) 396 396 this.app.ports.setAudioIsLoading.send(false) 397 - if (event.target.paused) playAudio(event.target, this.activeQueueItem) 397 + if (event.target.paused) playAudio(event.target, this.activeQueueItem, this.app) 398 398 } 399 399 400 400 ··· 446 446 } 447 447 448 448 449 - function playAudio(element, queueItem) { 449 + function playAudio(element, queueItem, app) { 450 450 if (queueItem.progress && element.duration) { 451 451 element.currentTime = queueItem.progress * element.duration 452 452 }