Initial commit

This commit is contained in:
Alex Ramirez 2022-11-08 21:06:10 -08:00
parent 80146696f3
commit 3c401c44b9

View file

@ -93,20 +93,27 @@ module.exports = angular.module('ponyfm').factory('player', [
{src: track.covers.small, sizes: '100x100', type: 'image/png'} {src: track.covers.small, sizes: '100x100', type: 'image/png'}
{src: track.covers.thumbnail, sizes: '50x50', type: 'image/png'} {src: track.covers.thumbnail, sizes: '50x50', type: 'image/png'}
] ]
)
navigator.mediaSession.setActionHandler(
'play' navigator.mediaSession.setActionHandler(
(() -> self.currentSound.play())) 'play'
navigator.mediaSession.setActionHandler( (() -> self.currentSound.play()))
'pause' navigator.mediaSession.setActionHandler(
(() -> self.currentSound.pause())) 'pause'
navigator.mediaSession.setActionHandler( (() -> self.currentSound.pause()))
'previoustrack' navigator.mediaSession.setActionHandler(
(() -> self.playPrev())) 'previoustrack'
navigator.mediaSession.setActionHandler( (() -> self.playPrev()))
'nexttrack' navigator.mediaSession.setActionHandler(
(() -> self.playNext())) 'nexttrack'
) (() -> self.playNext()))
navigator.mediaSession.setPositionState(
duration: track.duration
playbackRate: 1
position: track.progressSeconds
);
self = self =
ready: false ready: false