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.

Add more mediaSession stuff

+15
+9
src/Javascript/audio-engine.js
··· 305 305 306 306 setProgressBarWidth(progress) 307 307 308 + if (navigator.mediaSession && navigator.mediaSession.setPositionState) { 309 + navigator.mediaSession.setPositionState({ 310 + duration: node.duration, 311 + position: node.currentTime 312 + }) 313 + } 314 + 308 315 if (node.duration >= 30 * 60) { 309 316 sendProgress(this, progress) 310 317 } ··· 344 351 345 352 function audioPlayEvent(event) { 346 353 this.app.ports.setAudioIsPlaying.send(true) 354 + if (navigator.mediaSession) navigator.mediaSession.playbackState = "playing" 347 355 } 348 356 349 357 350 358 function audioPauseEvent(event) { 351 359 this.app.ports.setAudioIsPlaying.send(false) 360 + if (navigator.mediaSession) navigator.mediaSession.playbackState = "paused" 352 361 } 353 362 354 363
+6
src/Javascript/index.js
··· 332 332 if (audio) audio.currentTime = Math.min(audio.currentTime + 10, audio.duration) 333 333 }) 334 334 335 + 336 + // navigator.mediaSession.setActionHandler("seekto", event => { 337 + // const audio = orchestrion.audio 338 + // if (audio) audio.currentTime = event.seekTime 339 + // }) 340 + 335 341 } 336 342 337 343