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

Configure Feed

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

Fix issue with not-always-updating audio duration

+17 -8
+4 -1
src/Applications/UI/Console.elm
··· 77 77 0 78 78 79 79 else 80 - (position / duration) * 100 80 + (position / duration) 81 + |> (*) 100 82 + |> min 100 83 + |> max 0 81 84 in 82 85 brick 83 86 [ on "click" (clickLocationDecoder Seek) ]
+13 -7
src/Javascript/audio-engine.js
··· 351 351 return this.app.ports.setAudioPosition.send(0) 352 352 } 353 353 354 + setDurationIfNecessary(node, this.app) 354 355 this.app.ports.setAudioPosition.send(node.currentTime) 355 356 356 357 if (navigator.mediaSession && navigator.mediaSession.setPositionState) { ··· 411 412 } 412 413 413 414 414 - let lastSetDuration = 0 415 - 416 - 417 415 function audioCanPlayEvent(event) { 418 - if (event.target.duration != lastSetDuration) { 419 - this.app.ports.setAudioDuration.send(event.target.duration || 0) 420 - lastSetDuration = event.target.duration 421 - } 416 + setDurationIfNecessary(event.target, this.app) 422 417 } 423 418 424 419 ··· 470 465 progress: progress 471 466 }) 472 467 }, 30000) 468 + 469 + 470 + let lastSetDuration = 0 471 + 472 + 473 + function setDurationIfNecessary(audio, app) { 474 + if (audio.duration != lastSetDuration) { 475 + app.ports.setAudioDuration.send(audio.duration || 0) 476 + lastSetDuration = audio.duration 477 + } 478 + } 473 479 474 480 475 481 function unstallAudio(node) {