Merge branch 'ssl'
This commit is contained in:
@ -153,7 +153,7 @@ const MopidyMiddleware = (function(){
|
||||
var state = store.getState();
|
||||
|
||||
socket = new Mopidy({
|
||||
webSocketUrl: 'ws://'+state.mopidy.host+':'+state.mopidy.port+'/mopidy/ws',
|
||||
webSocketUrl: 'ws'+(window.location.protocol === 'https:' ? 's' : '')+'://'+state.mopidy.host+':'+state.mopidy.port+'/mopidy/ws',
|
||||
callingConvention: 'by-position-or-by-name'
|
||||
});
|
||||
|
||||
|
||||
@ -15,7 +15,8 @@ export default function reducer(mopidy = {}, action){
|
||||
case 'MOPIDY_SET_CONFIG':
|
||||
return Object.assign({}, mopidy, {
|
||||
host: action.host,
|
||||
port: action.port
|
||||
port: action.port,
|
||||
ssl: action.ssl
|
||||
});
|
||||
|
||||
case 'MOPIDY_CHANGE_TRACK':
|
||||
|
||||
@ -73,7 +73,7 @@ const PusherMiddleware = (function(){
|
||||
connection.username = connection.username.replace(/\W/g, '')
|
||||
|
||||
socket = new WebSocket(
|
||||
'ws://'+state.mopidy.host+':'+state.mopidy.port+'/iris/ws',
|
||||
'ws'+(window.location.protocol === 'https:' ? 's' : '')+'://'+state.mopidy.host+':'+state.mopidy.port+'/iris/ws',
|
||||
[ connection.clientid, connection.connection_id, connection.username ]
|
||||
);
|
||||
|
||||
@ -344,4 +344,4 @@ const PusherMiddleware = (function(){
|
||||
|
||||
})();
|
||||
|
||||
export default PusherMiddleware
|
||||
export default PusherMiddleware
|
||||
|
||||
Reference in New Issue
Block a user