Initial commit

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

View file

@ -93,21 +93,28 @@ 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'
(() -> self.currentSound.play()))
navigator.mediaSession.setActionHandler(
'pause'
(() -> self.currentSound.pause()))
navigator.mediaSession.setActionHandler(
'previoustrack'
(() -> self.playPrev()))
navigator.mediaSession.setActionHandler(
'nexttrack'
(() -> self.playNext()))
) )
navigator.mediaSession.setActionHandler(
'play'
(() -> self.currentSound.play()))
navigator.mediaSession.setActionHandler(
'pause'
(() -> self.currentSound.pause()))
navigator.mediaSession.setActionHandler(
'previoustrack'
(() -> self.playPrev()))
navigator.mediaSession.setActionHandler(
'nexttrack'
(() -> self.playNext()))
navigator.mediaSession.setPositionState(
duration: track.duration
playbackRate: 1
position: track.progressSeconds
);
self = self =
ready: false ready: false
isPlaying: false isPlaying: false