Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Speaker Aliases #183

Open
jer78 opened this issue Jun 28, 2017 · 1 comment
Open

Speaker Aliases #183

jer78 opened this issue Jun 28, 2017 · 1 comment

Comments

@jer78
Copy link

jer78 commented Jun 28, 2017

Is there a way to make alias’s for speakers? For instance I have one named Living Room but since it’s an open concept it would be nice to say Kitchen, Dining Room, Main Floor etc.

@jer78
Copy link
Author

jer78 commented Jul 4, 2017

Here's a hack that gets this working. I couldn't find a global place to put the following so I just put it in all the functions in the sonosProxyFactory.js file:

if(room == "bedroom" || room == "upstairs"){
      var room = "master bedroom" 
    }
    else if(room == "kitchen" || room == "main floor" || room == "downstairs" || room == "dining room"){
      var room = "living room"
    }

Here's an example:

sonosProxy.playlist = function(room, playlist) {
    if(room == "bedroom" || room == "upstairs"){
      var room = "master bedroom" 
    }
    else if(room == "kitchen" || room == "main floor" || room == "downstairs" || room == "dining room"){
      var room = "living room"
    }
    var room = encodeURIComponent(room);
    var playlist = encodeURIComponent(playlist);
    var path = `/${room}/playlist/${playlist}`;

    return makeCall(path);
};

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant