Parallax refinement; Album responsive; Pusher browser notifications
This commit is contained in:
@ -161,6 +161,47 @@ const MopidyMiddleware = (function(){
|
||||
instruct( socket, store, action.call, action.value )
|
||||
break;
|
||||
|
||||
// send an instruction to the websocket
|
||||
case 'MOPIDY_NEXT':
|
||||
var icon = false
|
||||
if( store.getState().ui.current_track ){
|
||||
icon = helpers.getTrackIcon( store.getState().ui.current_track )
|
||||
}
|
||||
store.dispatch({
|
||||
type: 'PUSHER_SEND_BROADCAST',
|
||||
action: 'broadcast',
|
||||
ignore_self: true,
|
||||
data: {
|
||||
type: 'notification',
|
||||
data: {
|
||||
title: 'Track skipped',
|
||||
body: store.getState().pusher.username +' skipped this track',
|
||||
icon: icon
|
||||
}
|
||||
}
|
||||
})
|
||||
break;
|
||||
|
||||
case 'MOPIDY_STOP':
|
||||
var icon = false
|
||||
if( store.getState().ui.current_track ){
|
||||
icon = helpers.getTrackIcon( store.getState().ui.current_track )
|
||||
}
|
||||
store.dispatch({
|
||||
type: 'PUSHER_SEND_BROADCAST',
|
||||
action: 'broadcast',
|
||||
ignore_self: true,
|
||||
data: {
|
||||
type: 'notification',
|
||||
data: {
|
||||
title: 'Playback stopped',
|
||||
body: store.getState().pusher.username +' stopped playback',
|
||||
icon: icon
|
||||
}
|
||||
}
|
||||
})
|
||||
break;
|
||||
|
||||
// send an instruction to the websocket
|
||||
case 'MOPIDY_URISCHEMES':
|
||||
var uri_schemes = action.data
|
||||
|
||||
Reference in New Issue
Block a user