fixing bugs, kicking ass, support for multiple bridge IPs

This commit is contained in:
lone-cloud 2015-09-17 16:10:33 -07:00
parent ee82ce63b6
commit bb7e4bf115
8 changed files with 54 additions and 33 deletions

View file

@ -5,13 +5,16 @@ Music awesomeness for hue lights.
# TODO # TODO
## FEATURES ## FEATURES
- finish beat detection light effects - finish beat detection light effects
- more granular light controls on the lights tab
- handle multiple bridge IPs for bridge-finder
- save beat detection settings per song - save beat detection settings per song
- more granular light controls on the lights tab
- app intro with intro.js - app intro with intro.js
- music visualizations with three.js - music visualizations with three.js
- new favicon - new favicon
## BUGS
- can't create groups anymore
- BUGS BUGS BUGS
## POSSIBLE FEATURES ## POSSIBLE FEATURES
- clear localstorage - clear localstorage
- help, contact, about, youtube video ??? - help, contact, about, youtube video ???
@ -19,8 +22,3 @@ Music awesomeness for hue lights.
- integration with youtube, soundcloud, spotify ??? - integration with youtube, soundcloud, spotify ???
- auto beat detection mode - auto beat detection mode
- lights on/off switch - lights on/off switch
## BUGS
- fuckery when listening to music and switching tabs
- can't create groups anymore
- BUGS BUGS BUGS

View file

@ -22,6 +22,7 @@ export default Em.Component.extend({
manualBridgeIp: null, manualBridgeIp: null,
manualBridgeIpNotFound: false, manualBridgeIpNotFound: false,
multipleBridgeIps: [],
actions: { actions: {
retry: function(){ retry: function(){
@ -77,6 +78,12 @@ export default Em.Component.extend({
localStorage.setItem('huegasm.bridgeIp', result[0].internalipaddress); localStorage.setItem('huegasm.bridgeIp', result[0].internalipaddress);
bridgeFindStatus = 'success'; bridgeFindStatus = 'success';
} else if(result.length > 1) { } else if(result.length > 1) {
var multipleBridgeIps = self.get('multipleBridgeIps');
result.forEach(function(item) {
multipleBridgeIps.push(item.internalipaddress);
});
bridgeFindStatus = 'multiple'; bridgeFindStatus = 'multiple';
} else { } else {
bridgeFindStatus = 'fail'; bridgeFindStatus = 'fail';

View file

@ -2,6 +2,7 @@ import Em from 'ember';
export default Em.Component.extend({ export default Em.Component.extend({
classNames: ['innerControlFrame'], classNames: ['innerControlFrame'],
classNameBindings: ['active::hidden'],
activeLights: [], activeLights: [],
lightsData: null, lightsData: null,

View file

@ -3,6 +3,7 @@ import musicControlMixin from '../mixins/music-control';
export default Em.Component.extend(musicControlMixin, { export default Em.Component.extend(musicControlMixin, {
classNames: ['innerControlFrame'], classNames: ['innerControlFrame'],
classNameBindings: ['active::hidden'],
actions: { actions: {
goToSong: function(index){ goToSong: function(index){
@ -235,7 +236,7 @@ export default Em.Component.extend(musicControlMixin, {
init: function () { init: function () {
this._super(); this._super();
var dancer = window.dancer || new Dancer(), var dancer = new Dancer(),
self = this, self = this,
threshold = this.get('threshold'), threshold = this.get('threshold'),
decay = this.get('decay'), decay = this.get('decay'),
@ -291,7 +292,6 @@ export default Em.Component.extend(musicControlMixin, {
self.set('timeTotal', Math.round(dancer.audio.duration)); self.set('timeTotal', Math.round(dancer.audio.duration));
}); });
window.dancer = dancer;
this.setProperties({ this.setProperties({
dancer: dancer, dancer: dancer,
kick: kick kick: kick
@ -339,12 +339,5 @@ export default Em.Component.extend(musicControlMixin, {
event.preventDefault(); event.preventDefault();
} }
}); });
},
// component clean up
destroy: function(){
//this.get('dancer').audioAdapter.context.close();
this.get('dancer').unbind('loaded');
this._super();
} }
}); });

View file

@ -86,6 +86,10 @@ md-progress-circular {
margin: 0 auto 20px auto !important; margin: 0 auto 20px auto !important;
} }
md-progress-linear {
margin-bottom: 50px;
}
#pressButtonBridgeImg { #pressButtonBridgeImg {
width: 200px; width: 200px;
margin: 0 auto 30px auto; margin: 0 auto 30px auto;
@ -96,6 +100,12 @@ md-progress-circular {
text-decoration: none; text-decoration: none;
} }
#bridgeButtonGroup {
width: 150px;
margin: 30px auto;
text-align: left;
}
// BRIDGE CONTROLS // BRIDGE CONTROLS
#bridgeControls { #bridgeControls {
position: relative; position: relative;
@ -297,14 +307,21 @@ md-toolbar {
color: white !important; color: white !important;
z-index: 20; z-index: 20;
background: linear-gradient(rgba(0, 0, 0, 0), rgba(0, 0, 0, 0.7)); background: linear-gradient(rgba(0, 0, 0, 0), rgba(0, 0, 0, 0.7));
.tooltip.top {
margin-top: -15px;
}
.tooltip-arrow {
display: none;
}
} }
#playerTimeControls { #playerTimeControls {
font-family: "Helvetica Neue", Helvetica, Arial, sans-serif; font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
position: relative;
font-size: 14px; font-size: 14px;
top: 0.167em; display: inline-block;
margin-left: 0.833em; margin-left: 1em;
position: relative;
bottom: 2px;
} }
.playerControllIcon { .playerControllIcon {
@ -384,6 +401,7 @@ md-toolbar {
width: 5em; width: 5em;
height: 0.4em; height: 0.4em;
display: inline-block; display: inline-block;
margin-bottom: 3px;
} }
.noUi-handle { .noUi-handle {
@ -447,18 +465,21 @@ md-toolbar {
margin: 10px auto 0 auto; margin: 10px auto 0 auto;
border-radius: 5px; border-radius: 5px;
transition: 0.1s all ease-in-out; transition: 0.1s all ease-in-out;
position: relative;
#dragHere { #dragHere {
position: absolute; position: absolute;
top: 41%; top: 27%;
right: 18%;
font-size: 20px; font-size: 20px;
text-align: center;
width: 100%;
} }
.library-music { .library-music {
position: absolute; position: absolute;
top: 50%; top: 40%;
right: 34%;
font-size: 100px; font-size: 100px;
opacity: 0.5; opacity: 0.5;
width: 100%;
text-align: center;
} }
} }
@ -579,7 +600,6 @@ md-toolbar {
transform: scale(1.1); transform: scale(1.1);
} }
} }
#beatArea .lightGroup { #beatArea .lightGroup {
margin: 10px 0 0 40px; margin: 10px 0 0 40px;
} }

View file

@ -11,11 +11,6 @@
{{/each}} {{/each}}
</div> </div>
{{#if lightsTabSelected class="tabSwitch"}} {{controls/light-control apiURL=apiURL lightsData=lightsData activeLights=activeLights trial=trial active=lightsTabSelected}}
{{controls/light-control apiURL=apiURL lightsData=lightsData activeLights=activeLights trial=trial}} {{controls/music-control apiURL=apiURL lightsData=lightsData activeLights=activeLights active=musicTabSelected}}
{{/if}}
{{#if musicTabSelected class="tabSwitch"}}
{{controls/music-control apiURL=apiURL lightsData=lightsData activeLights=activeLights}}
{{/if}}
{{/if}} {{/if}}

View file

@ -16,7 +16,14 @@
{{/unless}} {{/unless}}
{{#if bridgeFindMultiple}} {{#if bridgeFindMultiple}}
<p>Found multiple hue bridges.</p> <p>Found multiple hue bridges. <br>
Please select the one you want to use for this application.</p>
<div id="bridgeButtonGroup">
{{#each multipleBridgeIps as |bridge|}}
{{#paper-radio value=bridge selected=bridgeIp}}{{bridge}}{{/paper-radio}}
{{/each}}
</div>
{{else}} {{else}}
{{#if bridgeFindFail}} {{#if bridgeFindFail}}
<p>A hue bridge was not found on your network :( <br> <p>A hue bridge was not found on your network :( <br>

View file

@ -14,7 +14,7 @@
--><span data-toggle="tooltip" data-placement="top" class="bootstrapTooltip" id="volumeMutedTooltip" data-title={{volumeMutedTooltipTxt}} {{action "volumeMutedChanged"}}>{{paper-icon icon=volumeClass class="playerControllIcon volumeButton"}}</span><!-- --><span data-toggle="tooltip" data-placement="top" class="bootstrapTooltip" id="volumeMutedTooltip" data-title={{volumeMutedTooltipTxt}} {{action "volumeMutedChanged"}}>{{paper-icon icon=volumeClass class="playerControllIcon volumeButton"}}</span><!--
-->{{range-slider start=volume min=0 max=100 slide="volumeChanged" id="volumeBar"}} -->{{range-slider start=volume min=0 max=100 slide="volumeChanged" id="volumeBar"}}
<span id="playerTimeControls">{{timeElapsedTxt}} / {{timeTotalTxt}}</span> <div id="playerTimeControls">{{timeElapsedTxt}} / {{timeTotalTxt}}</div>
<span class="pull-right"> <span class="pull-right">
<span data-toggle="tooltip" data-placement="top" class="bootstrapTooltip" <span data-toggle="tooltip" data-placement="top" class="bootstrapTooltip"