diff --git a/mobile/app/pods/components/bridge-finder/component.js b/mobile/app/pods/components/bridge-finder/component.js
index 04aba6c..bb165f2 100644
--- a/mobile/app/pods/components/bridge-finder/component.js
+++ b/mobile/app/pods/components/bridge-finder/component.js
@@ -6,6 +6,7 @@ const {
computed,
on,
isNone,
+ run: { later },
$
} = Ember;
@@ -152,7 +153,9 @@ export default Component.extend({
type: 'POST'
}).fail(() => {
this.set('manualBridgeIpNotFound', true);
- setTimeout(() => { this.set('manualBridgeIpNotFound', false); }, 5000);
+ later(this, function() {
+ this.set('manualBridgeIpNotFound', false);
+ }, 5000);
}).then(() => {
this.set('bridgeIp', manualBridgeIp);
});
diff --git a/mobile/app/pods/components/hue-controls/component.js b/mobile/app/pods/components/hue-controls/component.js
index ac89f6d..ad910ad 100644
--- a/mobile/app/pods/components/hue-controls/component.js
+++ b/mobile/app/pods/components/hue-controls/component.js
@@ -7,6 +7,7 @@ const {
isNone,
run,
inject,
+ run: { later },
$
} = Ember;
@@ -76,7 +77,7 @@ export default Component.extend({
if(!this.get('trial')) {
this.updateLightData();
- this.set('lightsDataIntervalHandle', setInterval(this.updateLightData.bind(this), 2000));
+ setInterval(this.updateLightData.bind(this), 2000);
}
if (!isNone(storage.get('huegasm.dimmerOn'))) {
@@ -88,10 +89,22 @@ export default Component.extend({
this.set('selectedTab', this.get('storage').get('huegasm.selectedTab'));
}
+ // document.addEventListener('deviceready', () => {
+ // cordova.plugins.backgroundMode.setDefaults({
+ // silent: true
+ // });
+ //
+ // cordova.plugins.backgroundMode.enable();
+ // }, false);
+
document.addEventListener('backbutton', () => {
- let index = (this.get('selectedTab') + 1) % this.tabList.length;
- this.set('selectedTab', index);
- this.get('storage').set('huegasm.selectedTab', index);
+ if(this.get('isShowingAddSoundCloudModal')){
+ this.set('isShowingAddSoundCloudModal', false);
+ } else {
+ let index = (this.get('selectedTab') + 1) % this.tabList.length;
+ this.set('selectedTab', index);
+ this.get('storage').set('huegasm.selectedTab', index);
+ }
}, false);
document.addEventListener('pause', () => {
@@ -111,7 +124,9 @@ export default Component.extend({
this.get('notify').warning({html: '
Error retrieving data from your lights. Yikes.
'});
this.set('displayFailure', false);
- setTimeout(()=>{ this.set('displayFailure', true); }, 30000);
+ later(this, function() {
+ this.set('displayFailure', true);
+ }, 30000);
}
};
@@ -215,6 +230,10 @@ export default Component.extend({
]
});
+ intro.onexit(() => {
+ $('body').velocity('scroll', { duration: 200 });
+ });
+
// it's VERY ugly but it works... the jQuery massacre :'(
intro.onchange((element) => {
if(element.id === '' || element.id === 'music-tab' || element.id === 'playlist' || element.id === 'player-area' || element.id === 'beat-option-row' || element.id === 'beat-option-button-group' || element.id === 'beat-container' || element.id === 'using-mic-audio-tooltip' || element.nodeName === 'MD-MENU'){
diff --git a/mobile/app/pods/components/hue-controls/template.hbs b/mobile/app/pods/components/hue-controls/template.hbs
index c0724a0..0696692 100644
--- a/mobile/app/pods/components/hue-controls/template.hbs
+++ b/mobile/app/pods/components/hue-controls/template.hbs
@@ -34,7 +34,7 @@
{{lights-tab active=(eq selectedTab 0) apiURL=apiURL lightsData=lightsData activeLights=activeLights syncLight=syncLight trial=trial colorLoopOn=colorLoopOn dimmerOn=dimmerOn playing=playing pauseLightUpdates=pauseLightUpdates}}
- {{music-tab active=(eq selectedTab 1) apiURL=apiURL lightsData=lightsData activeLights=activeLights pauseLightUpdates=pauseLightUpdates dimmerOn=dimmerOn playing=playing storage=storage colorLoopOn=colorLoopOn action="startIntro"}}
+ {{music-tab active=(eq selectedTab 1) apiURL=apiURL lightsData=lightsData activeLights=activeLights pauseLightUpdates=pauseLightUpdates dimmerOn=dimmerOn playing=playing storage=storage colorLoopOn=colorLoopOn isShowingAddSoundCloudModal=isShowingAddSoundCloudModal action="startIntro"}}
{{else}}
{{paper-progress-circular diameter=100}}
{{/if}}
diff --git a/mobile/app/pods/components/lights-tab/component.js b/mobile/app/pods/components/lights-tab/component.js
index 093283a..98d483d 100644
--- a/mobile/app/pods/components/lights-tab/component.js
+++ b/mobile/app/pods/components/lights-tab/component.js
@@ -5,6 +5,7 @@ const {
observer,
computed,
on,
+ run: { later },
$
} = Ember;
@@ -207,11 +208,11 @@ export default Component.extend({
for (let key in lightsData) {
if (lightsData.hasOwnProperty(key)) {
- setTimeout(updateLight, 2000, key);
+ later(this, updateLight, key, 2000);
}
}
- setTimeout(()=>{this.onColorLoopOnChange();}, 2000);
+ later(this, this.onColorLoopOnChange, 2000);
clearInterval(this.get('strobeOnInervalHandle'));
}
diff --git a/mobile/app/pods/components/music-tab/add-soundcloud-sound-modal/component.js b/mobile/app/pods/components/music-tab/add-soundcloud-sound-modal/component.js
index d95bc08..34cf66b 100644
--- a/mobile/app/pods/components/music-tab/add-soundcloud-sound-modal/component.js
+++ b/mobile/app/pods/components/music-tab/add-soundcloud-sound-modal/component.js
@@ -6,6 +6,7 @@ const {
computed,
isEmpty,
isNone,
+ run: { later },
$
} = Ember;
@@ -15,7 +16,7 @@ export default Component.extend({
onIsShowingModalChange: observer('isShowingModal', function(){
if(this.get('isShowingModal')){
this.set('url', null);
- setTimeout(()=>{
+ later(this, function() {
$('md-input-container input').focus();
}, 500);
}
diff --git a/mobile/app/pods/components/music-tab/component.js b/mobile/app/pods/components/music-tab/component.js
index 883457d..f6106d2 100644
--- a/mobile/app/pods/components/music-tab/component.js
+++ b/mobile/app/pods/components/music-tab/component.js
@@ -8,31 +8,10 @@ const {
isEmpty,
isNone,
$,
- run
+ run: { later, next }
} = Ember;
export default Component.extend(helperMixin, visualizerMixin, {
- onAmbienceModeChange: observer('ambienceMode', 'playing', function(){
- if(this.get('ambienceMode') && this.get('playing')) {
- this.set('ambienceModeHandle', setInterval(()=> {this.doAmbienceLightChange();}, 5000));
- this.setProperties({
- 'colorloopMode': false,
- 'flashingTransitions': false
- });
- } else if(this.get('ambienceModeHandle')) {
- this.get('activeLights').forEach((light)=>{
- $.ajax(this.get('apiURL') + '/lights/' + light + '/state', {
- data: JSON.stringify({'on': true}),
- contentType: 'application/json',
- type: 'PUT'
- });
- });
-
- clearInterval(this.get('ambienceModeHandle'));
- this.set('ambienceModeHandle', null);
- }
- }),
-
updatePageTitle: observer('playQueuePointer', function(){
let title = 'Huegasm',
playQueuePointer = this.get('playQueuePointer'),
@@ -104,70 +83,6 @@ export default Component.extend(helperMixin, visualizerMixin, {
this.set('oldBeatPrefCache', newOldBeatPrefCache);
},
- doAmbienceLightChange(justOneLight){
- let activeLights = this.get('activeLights'),
- lightsData = this.get('lightsData'),
- workedLights = this.get('ambienceWorkedLights'),
- hueRange = this.get('hueRange'),
- ambienceWorkedLightsHandles = this.get('ambienceWorkedLightsHandles'),
- lightOff = (light)=>{
- if(this.get('ambienceMode') && this.get('playing')){
- $.ajax(this.get('apiURL') + '/lights/' + light + '/state', {
- data: JSON.stringify({'on': false, 'transitiontime': 20}),
- contentType: 'application/json',
- type: 'PUT'
- });
- }
- },
- lights = [],
- transitionTime = Math.floor(Math.random()*20),
- iterations = justOneLight ? 1 : activeLights.length/2;
-
- // pick some random lights
- for(let i=0; i < iterations; i++){
- let l = activeLights[Math.floor(Math.random()*activeLights.length)];
-
- if(!lights.includes(l) && !workedLights.includes(l)){
- lights.push(l);
- workedLights.push(l);
- } else if(justOneLight && workedLights.length !== activeLights.length){ // work a light if we only need one
- while(workedLights.includes(l)){
- l = activeLights[Math.floor(Math.random()*activeLights.length)];
- }
-
- lights.push(l);
- workedLights.push(l);
- }
- }
-
- lights.forEach((light)=>{
- let options = {'hue': Math.floor(Math.random()*(hueRange[1] - hueRange[0] + 1)+hueRange[0]), 'bri': Math.floor(Math.random()*200) + 1, 'transitiontime': transitionTime};
-
- if(lightsData[light].state.on === false){
- options.on = true;
- }
-
- $.ajax(this.get('apiURL') + '/lights/' + light + '/state', {
- data: JSON.stringify(options),
- contentType: 'application/json',
- type: 'PUT'
- });
-
- // stop the light from turning off
- if(ambienceWorkedLightsHandles[light]){
- clearTimeout(ambienceWorkedLightsHandles[light]);
- delete ambienceWorkedLightsHandles[light];
- }
-
- // turn the light off after it's been idle for a while
- ambienceWorkedLightsHandles[light] = setTimeout(()=>{
- lightOff(light);
- workedLights.removeObject(light);
- delete ambienceWorkedLightsHandles[light];
- }, transitionTime * 100 + 1000);
- });
- },
-
clearCurrentAudio(resetPointer) {
let dancer = this.get('dancer');
@@ -216,7 +131,7 @@ export default Component.extend(helperMixin, visualizerMixin, {
},
timeToBriOff = 100;
- if(activeLights.length > 0 && !this.get('ambienceMode')){
+ if(activeLights.length > 0){
let lastLightBopIndex = this.get('lastLightBopIndex'),
lightBopIndex,
brightnessOnBeat = 254,
@@ -245,17 +160,13 @@ export default Component.extend(helperMixin, visualizerMixin, {
}
stimulateLight(light, brightnessOnBeat, color);
- setTimeout(stimulateLight, timeToBriOff, light, 1);
+ later(this, stimulateLight, light, 1, timeToBriOff);
}
this.set('paused', true);
- setTimeout(() => {
+ later(this, function(){{
this.set('paused', false);
- }, 150);
-
- if(this.get('ambienceMode') && activeLights.length > 0){
- this.doAmbienceLightChange(true);
- }
+ }}, 150);
//work the music beat area - simulate the speaker vibration by running a CSS animation on it
$('#beat-speaker-center-outer').velocity({blur: 3}, 100).velocity({blur: 0}, 100);
@@ -287,8 +198,7 @@ export default Component.extend(helperMixin, visualizerMixin, {
kick: kick
});
-
- ['shuffle', 'repeat', 'threshold', 'playerBottomDisplayed', 'audioMode', 'songBeatPreferences', 'firstVisit', 'currentVisName', 'playQueue', 'playQueuePointer', 'flashingTransitions', 'colorloopMode', 'ambienceMode', 'hueRange'].forEach((item)=>{
+ ['shuffle', 'repeat', 'threshold', 'playerBottomDisplayed', 'audioMode', 'songBeatPreferences', 'firstVisit', 'currentVisName', 'playQueue', 'playQueuePointer', 'flashingTransitions', 'colorloopMode', 'hueRange'].forEach((item)=>{
if (!isNone(storage.get('huegasm.' + item))) {
let itemVal = storage.get('huegasm.' + item);
@@ -305,7 +215,9 @@ export default Component.extend(helperMixin, visualizerMixin, {
});
document.addEventListener('pause', () => {
- this.get('dancer').pause();
+ if(this.get('playing')){
+ this.send('play');
+ }
}, false);
},
@@ -501,7 +413,7 @@ export default Component.extend(helperMixin, visualizerMixin, {
}
if(scrollToSong){
- run.next(this, ()=>{
+ next(this, ()=>{
$('.track'+index).velocity('scroll', { container: $('#play-list-area'), duration: 200 });
});
}
diff --git a/mobile/app/pods/components/music-tab/mixins/helpers.js b/mobile/app/pods/components/music-tab/mixins/helpers.js
index 0861289..2120360 100644
--- a/mobile/app/pods/components/music-tab/mixins/helpers.js
+++ b/mobile/app/pods/components/music-tab/mixins/helpers.js
@@ -82,14 +82,11 @@ export default Mixin.create({
playerBottomDisplayed: true,
dragging: false,
draggingOverPlayListArea: false,
- dragLeaveTimeoutHandle: null,
- ambienceModeHandle: null,
audioStream: null,
dimmerOn: false,
isShowingAddSoundCloudModal: false,
colorloopMode: false,
- ambienceMode: false,
flashingTransitions: false,
// 0 - no repeat, 1 - repeat all, 2 - repeat one
@@ -105,8 +102,6 @@ export default Mixin.create({
oldBeatPrefCache: null,
storage: null,
firstVisit: true,
- ambienceWorkedLights: [],
- ambienceWorkedLightsHandles: {},
soundCloudFuckUps: 0,
maxSoundCloudFuckUps: 3,
@@ -256,7 +251,7 @@ export default Mixin.create({
this.set('colorLoopOn', this.get('playing') && this.get('colorloopMode'));
}),
- onOptionChange: observer('flashingTransitions', 'playQueue.[]', 'playQueuePointer', 'colorloopMode', 'ambienceMode', function(self, option){
+ onOptionChange: observer('flashingTransitions', 'playQueue.[]', 'playQueuePointer', 'colorloopMode', function(self, option){
option = option.replace('.[]', '');
this.get('storage').set('huegasm.' + option, this.get(option));
}),
diff --git a/mobile/app/styles/introjs.scss b/mobile/app/styles/introjs.scss
index ecc3f4d..fc7b5a1 100644
--- a/mobile/app/styles/introjs.scss
+++ b/mobile/app/styles/introjs.scss
@@ -1,13 +1,8 @@
-.introjs-overlay {
- background: $blackish;
-}
-
#settings.introjs-fixParent {
position: inherit !important;
}
.introjs-tooltip {
- color: $blackish;
width: 300px;
}
diff --git a/mobile/bower.json b/mobile/bower.json
index 8ac5db6..d7a88d5 100644
--- a/mobile/bower.json
+++ b/mobile/bower.json
@@ -5,7 +5,6 @@
"bootstrap-sass": "^3.3.5",
"ember": "^2.10.0",
"ember-cli-shims": "^0.1.0",
- "ember-load-initializers": "^0.5.1",
"ember-qunit-notifications": "0.1.0",
"hammer.js": "^2.0.8",
"intro.js": "^2.1.0",
diff --git a/mobile/config/environment.js b/mobile/config/environment.js
index c5aa305..1d7d854 100644
--- a/mobile/config/environment.js
+++ b/mobile/config/environment.js
@@ -4,7 +4,7 @@ module.exports = function(environment) {
var ENV = {
modulePrefix: 'huegasm_mobile',
podModulePrefix: 'huegasm_mobile/pods',
- environment: environment,
+ environment,
rootURL: '',
locationType: 'hash',
EmberENV: {
diff --git a/mobile/ember-cli-build.js b/mobile/ember-cli-build.js
index 1523eaf..d105b6c 100644
--- a/mobile/ember-cli-build.js
+++ b/mobile/ember-cli-build.js
@@ -8,6 +8,7 @@ module.exports = function(defaults) {
app.import('bower_components/intro.js/intro.js');
app.import('bower_components/intro.js/introjs.css');
+ app.import('bower_components/intro.js/themes/introjs-nassim.css');
app.import('bower_components/JavaScript-ID3-Reader/dist/id3-minimized.js');
app.import('bower_components/locallyjs/dist/locally.min.js');
app.import('bower_components/velocity/velocity.js');
diff --git a/mobile/ember-cordova/cordova/config.xml b/mobile/ember-cordova/cordova/config.xml
index d4c5a6e..9dc6b2e 100644
--- a/mobile/ember-cordova/cordova/config.xml
+++ b/mobile/ember-cordova/cordova/config.xml
@@ -1,5 +1,5 @@
-
+
Huegasm
Huegasm is a free web application for managing and synchronizing your Philips Hue lights with the beat of your music.
@@ -89,4 +89,6 @@
+
+
diff --git a/web/app/pods/components/bridge-finder/component.js b/web/app/pods/components/bridge-finder/component.js
index 551f846..b6979b3 100644
--- a/web/app/pods/components/bridge-finder/component.js
+++ b/web/app/pods/components/bridge-finder/component.js
@@ -6,6 +6,7 @@ const {
computed,
on,
isNone,
+ run: { later },
$
} = Ember;
@@ -142,7 +143,9 @@ export default Component.extend({
type: 'POST'
}).fail(() => {
this.set('manualBridgeIpNotFound', true);
- setTimeout(() => { this.set('manualBridgeIpNotFound', false); }, 5000);
+ later(this, function(){
+ this.set('manualBridgeIpNotFound', false);
+ }, 5000);
}).then(() => {
this.set('bridgeIp', manualBridgeIp);
});
diff --git a/web/app/pods/components/hue-controls/component.js b/web/app/pods/components/hue-controls/component.js
index 9f18a97..1b58df8 100644
--- a/web/app/pods/components/hue-controls/component.js
+++ b/web/app/pods/components/hue-controls/component.js
@@ -6,7 +6,7 @@ const {
computed,
isEmpty,
isNone,
- run,
+ run: { later },
inject,
$
} = Ember;
@@ -76,7 +76,7 @@ export default Component.extend({
if(!this.get('trial')) {
this.updateLightData();
- this.set('lightsDataIntervalHandle', setInterval(this.updateLightData.bind(this), 2000));
+ setInterval(this.updateLightData.bind(this), 2000);
}
if (!isNone(this.get('storage').get('huegasm.selectedTab'))) {
@@ -92,7 +92,9 @@ export default Component.extend({
this.get('notify').warning({html: 'Error retrieving data from your lights. Yikes.
'});
this.set('displayFailure', false);
- setTimeout(()=>{ this.set('displayFailure', true); }, 30000);
+ later(this, function() {
+ this.set('displayFailure', true);
+ }, 30000);
}
};
@@ -198,6 +200,10 @@ export default Component.extend({
]
});
+ intro.onexit(() => {
+ $('body').velocity('scroll', { duration: 200 });
+ });
+
intro.onchange((element) => {
if(element.id === '' || element.id === 'music-tab' || element.id === 'playlist' || element.id === 'player-area' || element.id === 'beat-option-row' || element.id === 'beat-option-button-group' || element.id === 'beat-container' || element.id === 'using-mic-audio-tooltip' || element.nodeName === 'MD-MENU'){
$('.navigation-item').eq(1).click();
@@ -221,7 +227,7 @@ export default Component.extend({
$('.introjs-nextbutton').click();
}
- run.later(this, function() {
+ later(this, function() {
$('.introjs-tooltip').velocity('scroll', { offset: -100 });
}, 500);
}).start();
diff --git a/web/app/pods/components/lights-tab/component.js b/web/app/pods/components/lights-tab/component.js
index a6873ce..713fda6 100644
--- a/web/app/pods/components/lights-tab/component.js
+++ b/web/app/pods/components/lights-tab/component.js
@@ -5,6 +5,7 @@ const {
observer,
computed,
on,
+ run: { later },
$
} = Ember;
@@ -208,11 +209,11 @@ export default Component.extend({
for (let key in lightsData) {
if (lightsData.hasOwnProperty(key)) {
- setTimeout(updateLight, 2000, key);
+ later(this, updateLight, key, 2000);
}
}
- setTimeout(()=>{this.onColorLoopOnChange();}, 2000);
+ later(this, this.onColorLoopOnChange, 2000);
clearInterval(this.get('strobeOnInervalHandle'));
}
diff --git a/web/app/pods/components/music-tab/add-soundcloud-sound-modal/component.js b/web/app/pods/components/music-tab/add-soundcloud-sound-modal/component.js
index d95bc08..072e4a9 100644
--- a/web/app/pods/components/music-tab/add-soundcloud-sound-modal/component.js
+++ b/web/app/pods/components/music-tab/add-soundcloud-sound-modal/component.js
@@ -6,6 +6,7 @@ const {
computed,
isEmpty,
isNone,
+ run: { later },
$
} = Ember;
@@ -15,7 +16,7 @@ export default Component.extend({
onIsShowingModalChange: observer('isShowingModal', function(){
if(this.get('isShowingModal')){
this.set('url', null);
- setTimeout(()=>{
+ later(function(){
$('md-input-container input').focus();
}, 500);
}
diff --git a/web/app/pods/components/music-tab/component.js b/web/app/pods/components/music-tab/component.js
index de8714c..9fb44f6 100644
--- a/web/app/pods/components/music-tab/component.js
+++ b/web/app/pods/components/music-tab/component.js
@@ -8,31 +8,10 @@ const {
isEmpty,
isNone,
$,
- run
+ run: { later, next }
} = Ember;
export default Component.extend(helperMixin, visualizerMixin, {
- onAmbienceModeChange: observer('ambienceMode', 'playing', function(){
- if(this.get('ambienceMode') && this.get('playing')) {
- this.set('ambienceModeHandle', setInterval(()=> {this.doAmbienceLightChange();}, 5000));
- this.setProperties({
- 'colorloopMode': false,
- 'flashingTransitions': false
- });
- } else if(this.get('ambienceModeHandle')) {
- this.get('activeLights').forEach((light)=>{
- $.ajax(this.get('apiURL') + '/lights/' + light + '/state', {
- data: JSON.stringify({'on': true}),
- contentType: 'application/json',
- type: 'PUT'
- });
- });
-
- clearInterval(this.get('ambienceModeHandle'));
- this.set('ambienceModeHandle', null);
- }
- }),
-
updatePageTitle: observer('playQueuePointer', function(){
let title = 'Huegasm',
playQueuePointer = this.get('playQueuePointer'),
@@ -104,70 +83,6 @@ export default Component.extend(helperMixin, visualizerMixin, {
this.set('oldBeatPrefCache', newOldBeatPrefCache);
},
- doAmbienceLightChange(justOneLight){
- let activeLights = this.get('activeLights'),
- lightsData = this.get('lightsData'),
- workedLights = this.get('ambienceWorkedLights'),
- hueRange = this.get('hueRange'),
- ambienceWorkedLightsHandles = this.get('ambienceWorkedLightsHandles'),
- lightOff = (light)=>{
- if(this.get('ambienceMode') && this.get('playing')){
- $.ajax(this.get('apiURL') + '/lights/' + light + '/state', {
- data: JSON.stringify({'on': false, 'transitiontime': 20}),
- contentType: 'application/json',
- type: 'PUT'
- });
- }
- },
- lights = [],
- transitionTime = Math.floor(Math.random()*20),
- iterations = justOneLight ? 1 : activeLights.length/2;
-
- // pick some random lights
- for(let i=0; i < iterations; i++){
- let l = activeLights[Math.floor(Math.random()*activeLights.length)];
-
- if(!lights.includes(l) && !workedLights.includes(l)){
- lights.push(l);
- workedLights.push(l);
- } else if(justOneLight && workedLights.length !== activeLights.length){ // work a light if we only need one
- while(workedLights.includes(l)){
- l = activeLights[Math.floor(Math.random()*activeLights.length)];
- }
-
- lights.push(l);
- workedLights.push(l);
- }
- }
-
- lights.forEach((light)=>{
- let options = {'hue': Math.floor(Math.random()*(hueRange[1] - hueRange[0] + 1)+hueRange[0]), 'bri': Math.floor(Math.random()*200) + 1, 'transitiontime': transitionTime};
-
- if(lightsData[light].state.on === false){
- options.on = true;
- }
-
- $.ajax(this.get('apiURL') + '/lights/' + light + '/state', {
- data: JSON.stringify(options),
- contentType: 'application/json',
- type: 'PUT'
- });
-
- // stop the light from turning off
- if(ambienceWorkedLightsHandles[light]){
- clearTimeout(ambienceWorkedLightsHandles[light]);
- delete ambienceWorkedLightsHandles[light];
- }
-
- // turn the light off after it's been idle for a while
- ambienceWorkedLightsHandles[light] = setTimeout(()=>{
- lightOff(light);
- workedLights.removeObject(light);
- delete ambienceWorkedLightsHandles[light];
- }, transitionTime * 100 + 1000);
- });
- },
-
clearCurrentAudio(resetPointer) {
let dancer = this.get('dancer');
@@ -259,18 +174,14 @@ export default Component.extend(helperMixin, visualizerMixin, {
}
stimulateLight(light, brightnessOnBeat, color);
- setTimeout(stimulateLight, timeToBriOff, light, 1);
+ later(this, stimulateLight, light, 1, timeToBriOff);
}
this.set('paused', true);
- setTimeout(() => {
+ later(this, function(){
this.set('paused', false);
}, 150);
- if(this.get('ambienceMode') && activeLights.length > 0){
- this.doAmbienceLightChange(true);
- }
-
//work the music beat area - simulate the speaker vibration by running a CSS animation on it
$('#beat-speaker-center-outer').velocity({blur: 3}, 100).velocity({blur: 0}, 100);
$('#beat-speaker-center-inner').velocity({scale: 1.05}, 100).velocity({scale: 1}, 100);
@@ -537,7 +448,7 @@ export default Component.extend(helperMixin, visualizerMixin, {
if(scrollToSong){
// this is just a bad workaround to make sure that the track has been rendered to the playlist
- run.next(this, ()=>{
+ next(this, ()=>{
$('.track'+index).velocity('scroll', { container: $('#play-list-area'), duration: 200 });
});
}
diff --git a/web/app/pods/components/music-tab/mixins/helpers.js b/web/app/pods/components/music-tab/mixins/helpers.js
index 3d6d033..8a47b7b 100644
--- a/web/app/pods/components/music-tab/mixins/helpers.js
+++ b/web/app/pods/components/music-tab/mixins/helpers.js
@@ -85,13 +85,11 @@ export default Mixin.create({
dragging: false,
draggingOverPlayListArea: false,
dragLeaveTimeoutHandle: null,
- ambienceModeHandle: null,
audioStream: null,
dimmerOn: false,
isShowingAddSoundCloudModal: false,
colorloopMode: false,
- ambienceMode: false,
flashingTransitions: false,
// 0 - no repeat, 1 - repeat all, 2 - repeat one
@@ -108,8 +106,6 @@ export default Mixin.create({
oldBeatPrefCache: null,
storage: null,
firstVisit: true,
- ambienceWorkedLights: [],
- ambienceWorkedLightsHandles: {},
soundCloudFuckUps: 0,
maxSoundCloudFuckUps: 3,
diff --git a/web/app/styles/hue-controls.scss b/web/app/styles/hue-controls.scss
index 8520d54..710d70f 100644
--- a/web/app/styles/hue-controls.scss
+++ b/web/app/styles/hue-controls.scss
@@ -46,7 +46,7 @@
z-index: 3;
text-align: right;
position: absolute;
- top: 5px;
+ top: -10px;
right: 10px;
transform: scale(1.1);
}
diff --git a/web/app/styles/introjs.scss b/web/app/styles/introjs.scss
index ecc3f4d..fc7b5a1 100644
--- a/web/app/styles/introjs.scss
+++ b/web/app/styles/introjs.scss
@@ -1,13 +1,8 @@
-.introjs-overlay {
- background: $blackish;
-}
-
#settings.introjs-fixParent {
position: inherit !important;
}
.introjs-tooltip {
- color: $blackish;
width: 300px;
}
diff --git a/web/bower.json b/web/bower.json
index af6813e..928da7d 100644
--- a/web/bower.json
+++ b/web/bower.json
@@ -5,7 +5,6 @@
"bootstrap-sass": "^3.3.5",
"ember": "^2.10.0",
"ember-cli-shims": "^0.1.0",
- "ember-load-initializers": "0.5.1",
"ember-qunit-notifications": "0.1.0",
"hammer.js": "^2.0.8",
"intro.js": "^2.1.0",
diff --git a/web/ember-cli-build.js b/web/ember-cli-build.js
index 1545640..40db3e4 100644
--- a/web/ember-cli-build.js
+++ b/web/ember-cli-build.js
@@ -9,6 +9,7 @@ module.exports = function(defaults) {
app.import('bower_components/bootstrap-sass/assets/javascripts/bootstrap/tooltip.js');
app.import('bower_components/intro.js/intro.js');
app.import('bower_components/intro.js/introjs.css');
+ app.import('bower_components/intro.js/themes/introjs-nassim.css');
app.import('bower_components/JavaScript-ID3-Reader/dist/id3-minimized.js');
app.import('bower_components/jquery-mousewheel/jquery.mousewheel.js');
app.import('bower_components/locallyjs/dist/locally.min.js');