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.

Single-audio-node mode for iOS

+13 -3
+9 -1
src/Javascript/audio-engine.js
··· 18 18 } 19 19 20 20 21 + const SINGLE_AUDIO_NODE = !!navigator.platform.match(/iPhone|iPod|iPad/) 22 + 23 + 21 24 22 25 // Container for <audio> elements 23 26 // ------------------------------ ··· 111 114 queueItem = 112 115 Object.assign({}, queueItem, { url: url }) 113 116 114 - if (audioNode = findExistingAudioElement(queueItem)) { 117 + if ((audioNode = audioElementsContainer.querySelector("audio")) && SINGLE_AUDIO_NODE) { 118 + audioNode.setAttribute("src", queueItem.url) 119 + audioNode.setAttribute("rel", queueItem.trackId) 120 + audioNode.play() 121 + 122 + } else if (audioNode = findExistingAudioElement(queueItem)) { 115 123 audioNode.setAttribute("data-timestamp", Date.now()) 116 124 audioNode.context = context.createMediaElementSource(audioNode) 117 125 audioNode.context.connect(volume)
+4 -2
src/Javascript/index.js
··· 69 69 orchestrion.audio = null 70 70 71 71 clearTimeout(orchestrion.loadingTimeoutId) 72 - removeOlderAudioElements(timestampInMilliseconds) 72 + SINGLE_AUDIO_NODE ? false : removeOlderAudioElements(timestampInMilliseconds) 73 73 74 74 if (item) { 75 75 insertTrack(orchestrion, item) ··· 108 108 109 109 110 110 app.ports.preloadAudio.subscribe(item => { 111 - preloadAudioElement(orchestrion, item) 111 + SINGLE_AUDIO_NODE 112 + ? false 113 + : preloadAudioElement(orchestrion, item) 112 114 }) 113 115 114 116