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.

Improve audio engine

+15 -5
+4 -4
src/Applications/UI/Console.elm
··· 42 42 , T.pt3 43 43 , T.white 44 44 ] 45 - [ if isLoading then 46 - text "Loading track …" 47 - 48 - else if hasStalled then 45 + [ if hasStalled then 49 46 Html.span 50 47 [ onClick Unstall ] 51 48 [ text "Your internet connection got interrupted, click to resume." ] 49 + 50 + else if isLoading then 51 + text "Loading track …" 52 52 53 53 else 54 54 case Maybe.map .identifiedTrack activeQueueItem of
+11 -1
src/Javascript/audio-engine.js
··· 115 115 audioNode.setAttribute("data-timestamp", Date.now()) 116 116 audioNode.context = context.createMediaElementSource(audioNode) 117 117 audioNode.context.connect(volume) 118 - audioNode.play() 118 + 119 + if (audioNode.readyState >= 4) { 120 + audioNode.play() 121 + } else { 122 + orchestrion.app.ports.setAudioIsLoading.send(true) 123 + audioNode.load() 124 + } 119 125 120 126 } else { 121 127 audioNode = createAudioElement(orchestrion, queueItem, Date.now()) ··· 175 181 176 182 177 183 function preloadAudioElement(orchestrion, queueItem) { 184 + // already preloaded? 185 + if (findExistingAudioElement(queueItem)) return 186 + 178 187 // audio element remains valid for 2 hours 179 188 createAudioElement( 180 189 orchestrion, ··· 228 237 229 238 230 239 function audioStalledEvent(event) { 240 + this.app.ports.setAudioIsLoading.send(true) 231 241 this.stalledTimeoutId = setTimeout(() => { 232 242 console.error(`Audio stalled for '${ audioElementTrackId(event.target) }'`) 233 243