finishing up with mobile ( hopefully ), bug fixes and improvements

This commit is contained in:
lone-cloud 2016-11-22 01:07:15 -08:00
parent d2368a3a6c
commit 82a3b987aa
24 changed files with 236 additions and 253 deletions

View file

@ -46,6 +46,12 @@ export default Component.extend({
this.send('findBridgeByIp'); this.send('findBridgeByIp');
} }
}); });
document.addEventListener('resume', () => {
if(this.get('error') || this.get('trial') || this.get('bridgeFindFail')) {
this.send('tryAgain');
}
}, false);
}, },
// find the bridge ip here // find the bridge ip here
@ -120,6 +126,10 @@ export default Component.extend({
}, },
actions: { actions: {
tryAgain() {
this.get('storage').clear();
location.reload();
},
retry(){ retry(){
this.onBridgeIpChange(); this.onBridgeIpChange();
}, },

View file

@ -2,9 +2,9 @@
{{#unless bridgeUsername}} {{#unless bridgeUsername}}
{{#if bridgeIp}} {{#if bridgeIp}}
{{#if error}} {{#if error}}
<p>Huegasm encountered a critical error while trying to connect to your bridge.<br><br> <p>Huegasm encountered a critical error while trying to connect to your bridge.<br><br>
This likely happened because you're using an outdated browser and/or because your browser does not support <a href="https://en.wikipedia.org/wiki/Cross-origin_resource_sharing" target="_blank" rel="noopener noreferrer">CORS</a>. Feel free to contact me through the link at the bottom of the page if you feel like this is not the case.<br> <a href="#" {{action "tryAgain"}}>TRY AGAIN</a>
For the best browsing experience on this site ( and every other one known to man ) please switch to <a href="https://www.google.com/chrome/" target="_blank" rel="noopener noreferrer">Google Chrome</a> or <a href="https://www.mozilla.org/en-US/firefox/new/" target="_blank" rel="noopener noreferrer">Firefox.</a></p> </p>
{{else}} {{else}}
<img src="assets/images/pressButtonBridge.png" id="press-bridge-button-img"> <img src="assets/images/pressButtonBridge.png" id="press-bridge-button-img">
{{paper-progress-linear warn=true value=bridgeUserNamePingIntervalProgress}} {{paper-progress-linear warn=true value=bridgeUserNamePingIntervalProgress}}

View file

@ -1,5 +1,4 @@
import Ember from 'ember'; import Ember from 'ember';
import ENV from 'huegasm_mobile/config/environment';
const { const {
A, A,
@ -7,6 +6,7 @@ const {
computed, computed,
isNone, isNone,
run, run,
inject,
$ $
} = Ember; } = Ember;
@ -22,6 +22,11 @@ export default Component.extend({
lightsTabSelected: computed.equal('selectedTab', 0), lightsTabSelected: computed.equal('selectedTab', 0),
musicTabSelected: computed.equal('selectedTab', 1), musicTabSelected: computed.equal('selectedTab', 1),
dimmerOn: false, dimmerOn: false,
playing: false,
displayFailure: true,
notify: inject.service(),
dimmerOnClass: computed('dimmerOn', function(){ dimmerOnClass: computed('dimmerOn', function(){
let dimmerOn = this.get('dimmerOn'), let dimmerOn = this.get('dimmerOn'),
@ -83,13 +88,29 @@ export default Component.extend({
if (!isNone(this.get('storage').get('huegasm.selectedTab'))) { if (!isNone(this.get('storage').get('huegasm.selectedTab'))) {
this.set('selectedTab', this.get('storage').get('huegasm.selectedTab')); this.set('selectedTab', this.get('storage').get('huegasm.selectedTab'));
} }
document.addEventListener('backbutton', () => {
let index = (this.get('selectedTab') + 1) % this.tabList.length;
this.set('selectedTab', index);
this.get('storage').set('huegasm.selectedTab', index);
}, false);
document.addEventListener('pause', () => {
this.set('pauseLightUpdates', true);
}, false);
document.addEventListener('resume', () => {
this.set('pauseLightUpdates', false);
}, false);
}, },
updateLightData(){ updateLightData(){
let fail = ()=>{ let fail = ()=>{
if(!ENV.ignoreFailures) { if(this.get('displayFailure')){
clearInterval(this.get('lightsDataIntervalHandle')); this.get('notify').warning({html: '<div class="alert alert-warning" role="alert">Error retrieving data from your lights. Yikes.</div>'});
this.send('clearBridge'); this.set('displayFailure', false);
setTimeout(()=>{ this.set('displayFailure', true); }, 30000);
} }
}; };

View file

@ -32,7 +32,9 @@
{{light-group lightsData=lightsData activeLights=activeLights syncLight=syncLight apiURL=apiURL dimmerOn=dimmerOn storage=storage}} {{light-group lightsData=lightsData activeLights=activeLights syncLight=syncLight apiURL=apiURL dimmerOn=dimmerOn storage=storage}}
{{lights-tab apiURL=apiURL lightsData=lightsData activeLights=activeLights syncLight=syncLight trial=trial active=lightsTabSelected colorLoopOn=colorLoopOn dimmerOn=dimmerOn strobeOn=pauseLightUpdates}} {{lights-tab apiURL=apiURL lightsData=lightsData activeLights=activeLights syncLight=syncLight trial=trial active=lightsTabSelected colorLoopOn=colorLoopOn dimmerOn=dimmerOn playing=playing pauseLightUpdates=pauseLightUpdates}}
{{music-tab apiURL=apiURL lightsData=lightsData activeLights=activeLights active=musicTabSelected pauseLightUpdates=pauseLightUpdates dimmerOn=dimmerOn storage=storage colorLoopOn=colorLoopOn action="startIntro"}} {{music-tab apiURL=apiURL lightsData=lightsData activeLights=activeLights active=musicTabSelected pauseLightUpdates=pauseLightUpdates dimmerOn=dimmerOn playing=playing storage=storage colorLoopOn=colorLoopOn action="startIntro"}}
{{/if}} {{/if}}
{{ember-notify messageStyle='bootstrap' closeAfter=5000}}

View file

@ -171,9 +171,10 @@ export default Component.extend({
lastStrobeLight: 0, lastStrobeLight: 0,
onStrobeOnChange: observer('strobeOn', function () { onStrobeOnChange: observer('strobeOn', function () {
let lightsData = this.get('lightsData'); let lightsData = this.get('lightsData'),
strobeOn = this.get('strobeOn');
if (this.get('strobeOn')) { if (strobeOn) {
this.set('preStrobeOnLightsDataCache', lightsData); this.set('preStrobeOnLightsDataCache', lightsData);
let stobeInitRequestData = {'sat': this.get('strobeSat'), 'transitiontime': 0}; let stobeInitRequestData = {'sat': this.get('strobeSat'), 'transitiontime': 0};
@ -213,6 +214,8 @@ export default Component.extend({
setTimeout(()=>{this.onColorLoopOnChange();}, 2000); setTimeout(()=>{this.onColorLoopOnChange();}, 2000);
clearInterval(this.get('strobeOnInervalHandle')); clearInterval(this.get('strobeOnInervalHandle'));
} }
this.set('pauseLightUpdates', strobeOn);
}), }),
strobeStep() { strobeStep() {

View file

@ -2,7 +2,7 @@
{{#paper-item}} {{#paper-item}}
{{paper-icon "power-settings-new" class=dimmerOnClass}} {{paper-icon "power-settings-new" class=dimmerOnClass}}
<p>Power</p> <p>Power</p>
{{paper-switch value=lightsOn onChange=(action (mut lightsOn)) disabled=trial skipProxy=trial label=lightsOnTxt}} {{paper-switch value=lightsOn onChange=(action (mut lightsOn)) disabled=(or trial playing) skipProxy=trial label=lightsOnTxt}}
{{/paper-item}} {{/paper-item}}
{{#paper-item}} {{#paper-item}}
@ -17,7 +17,7 @@
{{#paper-menu offset="0 -100" as |menu|}} {{#paper-menu offset="0 -100" as |menu|}}
{{#menu.trigger}} {{#menu.trigger}}
{{#paper-button iconButton=false}} {{#paper-button iconButton=false}}
{{paper-button raised=true class="color" disabled=trial}} {{paper-button raised=true class="color" disabled=(or trial playing)}}
{{/paper-button}} {{/paper-button}}
{{/menu.trigger}} {{/menu.trigger}}
{{#menu.content class="color-content" width=8 as |content|}} {{#menu.content class="color-content" width=8 as |content|}}
@ -31,12 +31,12 @@
{{#paper-item}} {{#paper-item}}
{{paper-icon "flare" class=dimmerOnClass}} {{paper-icon "flare" class=dimmerOnClass}}
<p>Strobe</p> <p>Strobe</p>
{{paper-switch value=strobeOn onChange=(action (mut strobeOn)) disabled=trial skipProxy=trial label=strobeOnTxt}} {{paper-switch value=strobeOn onChange=(action (mut strobeOn)) disabled=(or trial playing) skipProxy=trial label=strobeOnTxt}}
{{/paper-item}} {{/paper-item}}
{{#paper-item}} {{#paper-item}}
{{paper-icon "color-lens" class=dimmerOnClass}} {{paper-icon "loop" id="loop-addition" class=dimmerOnClass}} {{paper-icon "color-lens" class=dimmerOnClass}} {{paper-icon "loop" id="loop-addition" class=dimmerOnClass}}
<p>Colorloop</p> <p>Colorloop</p>
{{paper-switch value=colorLoopOn onChange=(action (mut colorLoopOn)) disabled=trial skipProxy=trial label=colorloopOnTxt}} {{paper-switch value=colorLoopOn onChange=(action (mut colorLoopOn)) disabled=(or trial playing) skipProxy=trial label=colorloopOnTxt}}
{{/paper-item}} {{/paper-item}}
{{/paper-list}} {{/paper-list}}

View file

@ -1,7 +1,7 @@
{{#if isShowingModal}} {{#if isShowingModal}}
{{#modal-dialog close="close" alignment="center" translucentOverlay=true attachment="center" targetAttachment="center"}} {{#modal-dialog close="close" alignment="center" translucentOverlay=true attachment="center" targetAttachment="center"}}
<p>Enter a <a href="https://soundcloud.com" onclick="window.open('https://soundcloud.com', '_system');">SoundCloud</a> track or playlist/set URL</p> <p>Enter a <a href="#" onclick="window.open('https://soundcloud.com', '_system');">SoundCloud</a> track or playlist/set URL</p>
<p>( ex. https://soundcloud.com/mrsuicidesheep/tracks )</p> <p>( ex. https://soundcloud.com/mrsuicidesheep/tracks )</p>
{{paper-input label="SoundCloud URL" icon="search" value=url onChange=(action (mut url))}} {{paper-input label="SoundCloud URL" icon="search" value=url onChange=(action (mut url))}}

View file

@ -168,46 +168,6 @@ export default Component.extend(helperMixin, visualizerMixin, {
}); });
}, },
startUsingMic() {
navigator.getUserMedia(
{audio: true},
(stream) => {
this.changePlayerControl('audioMode', 1);
let dancer = this.get('dancer');
if(dancer.audio && dancer.audio.pause) {
dancer.pause();
}
this.setProperties({
volumeCache: this.get('volume'),
playing: true,
audioStream: stream
});
document.title = 'Listening to Mic - Huegasm';
dancer.load(stream, this.get('micBoost'), true);
this.set('usingBeatPreferences', false);
// much more sensitive beat preference settings are needed for mic mode
this.setProperties({
oldThreshold: this.get('threshold'),
threshold: 0.1
});
dancer.setVolume(0);
},
(err) => {
if(err.name === 'DevicesNotFoundError'){
this.get('notify').alert({html: this.get('notFoundHtml')});
}
console.log('Error during navigator.getUserMedia: ' + err.name + ', ' + err.message + ', ' + err.constraintName);
}
);
},
clearCurrentAudio(resetPointer) { clearCurrentAudio(resetPointer) {
let dancer = this.get('dancer'); let dancer = this.get('dancer');
@ -327,11 +287,8 @@ export default Component.extend(helperMixin, visualizerMixin, {
kick: kick kick: kick
}); });
if(navigator.getUserMedia === undefined){
this.set('usingMicSupported', false);
}
['volume', 'shuffle', 'repeat', 'threshold', 'playerBottomDisplayed', 'audioMode', 'songBeatPreferences', 'firstVisit', 'currentVisName', 'playQueue', 'playQueuePointer', 'micBoost', 'flashingTransitions', 'colorloopMode', 'ambienceMode', 'hueRange'].forEach((item)=>{ ['shuffle', 'repeat', 'threshold', 'playerBottomDisplayed', 'audioMode', 'songBeatPreferences', 'firstVisit', 'currentVisName', 'playQueue', 'playQueuePointer', 'micBoost', 'flashingTransitions', 'colorloopMode', 'ambienceMode', 'hueRange'].forEach((item)=>{
if (!isNone(storage.get('huegasm.' + item))) { if (!isNone(storage.get('huegasm.' + item))) {
let itemVal = storage.get('huegasm.' + item); let itemVal = storage.get('huegasm.' + item);
@ -346,6 +303,26 @@ export default Component.extend(helperMixin, visualizerMixin, {
SC.initialize({ SC.initialize({
client_id: this.get('SC_CLIENT_ID') client_id: this.get('SC_CLIENT_ID')
}); });
document.addEventListener('volumedownbutton', () => {
let volume = this.get('volume') - 5;
volume = volume < 0 ? 0 : volume;
this.set('volume', volume);
window.system.setSystemVolume(volume/100);
}, false);
document.addEventListener('volumeupbutton', () => {
let volume = this.get('volume') + 5;
volume = volume > 100 ? 100 : volume;
this.set('volume', volume);
window.system.setSystemVolume(volume/100);
}, false);
document.addEventListener('pause', () => {
this.get('dancer').pause();
}, false);
}, },
didInsertElement() { didInsertElement() {
@ -498,7 +475,6 @@ export default Component.extend(helperMixin, visualizerMixin, {
if(this.get('playQueuePointer') !== -1) { if(this.get('playQueuePointer') !== -1) {
this.send('goToSong', this.get('playQueuePointer')); this.send('goToSong', this.get('playQueuePointer'));
this.send('volumeChanged', this.get('volume'));
} }
// restore the old beat preferences ( before the user went into mic mode ) // restore the old beat preferences ( before the user went into mic mode )
@ -508,13 +484,6 @@ export default Component.extend(helperMixin, visualizerMixin, {
document.title = 'Huegasm'; document.title = 'Huegasm';
}, },
useMicAudio() {
if(this.get('usingMicAudio')) {
this.send('useLocalAudio');
} else {
this.startUsingMic();
}
},
slideTogglePlayerBottom(){ slideTogglePlayerBottom(){
let elem = this.$('#player-bottom'); let elem = this.$('#player-bottom');
@ -603,10 +572,11 @@ export default Component.extend(helperMixin, visualizerMixin, {
}, },
play(replayPause) { play(replayPause) {
let dancer = this.get('dancer'), let dancer = this.get('dancer'),
playQueuePointer = this.get('playQueuePointer'); playQueuePointer = this.get('playQueuePointer'),
playing = this.get('playing');
if(playQueuePointer !== -1 ) { if(playQueuePointer !== -1 ) {
if (this.get('playing')) { if (playing) {
dancer.pause(); dancer.pause();
if(!replayPause){ if(!replayPause){
@ -626,16 +596,11 @@ export default Component.extend(helperMixin, visualizerMixin, {
dancer.play(); dancer.play();
} }
this.set('pauseLightUpdates', !playing);
this.onColorloopModeChange(); this.onColorloopModeChange();
this.toggleProperty('playing'); this.toggleProperty('playing');
} }
}, },
volumeChanged(value) {
this.changePlayerControl('volume', value);
if(this.get('playing')) {
this.get('dancer').setVolume(value/100);
}
},
next(repeatAll) { next(repeatAll) {
let playQueuePointer = this.get('playQueuePointer'), let playQueuePointer = this.get('playQueuePointer'),
playQueue = this.get('playQueue'), playQueue = this.get('playQueue'),
@ -744,15 +709,9 @@ export default Component.extend(helperMixin, visualizerMixin, {
micBoostChanged(value) { micBoostChanged(value) {
this.set('micBoost', value); this.set('micBoost', value);
this.get('storage').set('huegasm.micBoost', value); this.get('storage').set('huegasm.micBoost', value);
if(this.get('usingMicAudio')) {
this.get('dancer').setBoost(value);
}
}, },
audioModeChanged(value){ audioModeChanged(value){
if(value === 1) { if(value === 0) {
this.startUsingMic();
} else if(value === 0) {
this.send('useLocalAudio'); this.send('useLocalAudio');
} else { } else {
this.set('audioMode', value); this.set('audioMode', value);

View file

@ -93,7 +93,6 @@ export default Mixin.create({
timeElapsed: 0, timeElapsed: 0,
timeTotal: 0, timeTotal: 0,
lastLightBopIndex: 0, lastLightBopIndex: 0,
usingMicSupported: false,
// 0 - local, 1 - mic, possibly more to come // 0 - local, 1 - mic, possibly more to come
audioMode: 0, audioMode: 0,
@ -197,18 +196,12 @@ export default Mixin.create({
let song = playQueue[playQueuePointer]; let song = playQueue[playQueuePointer];
if(song.scUrl && !isNone(song.picture)){ if(song.scUrl && !isNone(song.picture)){
pic = song.picture.replace('67x67', '500x500'); pic = song.picture.replace('67x67', '500x500');
} else {
pic = song.picture;
} }
} }
return pic; return pic;
}), }),
pauseLightUpdates: computed('playing', function(){
return this.get('playing');
}),
micIcon: computed('usingMicAudio', function(){ micIcon: computed('usingMicAudio', function(){
if(this.get('usingMicAudio')) { if(this.get('usingMicAudio')) {
return 'mic'; return 'mic';

View file

@ -73,10 +73,6 @@
{{/paper-menu}} {{/paper-menu}}
{{/if}} {{/if}}
{{#if usingMicSupported}}
<span {{action "useMicAudio"}}>{{paper-icon icon=micIcon class=usingMicAudioClass}}</span>
{{/if}}
{{#if usingLocalAudio}} {{#if usingLocalAudio}}
<span {{action "shuffleChanged"}}>{{paper-icon "shuffle" class=shuffleClass}}</span> <span {{action "shuffleChanged"}}>{{paper-icon "shuffle" class=shuffleClass}}</span>
<span {{action "repeatChanged"}}>{{paper-icon repeatIcon class=repeatClass}}</span> <span {{action "repeatChanged"}}>{{paper-icon repeatIcon class=repeatClass}}</span>
@ -198,6 +194,4 @@
</div> </div>
</div> </div>
{{ember-notify messageStyle='bootstrap' closeAfter=5000}}
{{music-tab/add-soundcloud-sound-modal action="handleNewSoundCloudURL" isShowingModal=isShowingAddSoundCloudModal}} {{music-tab/add-soundcloud-sound-modal action="handleNewSoundCloudURL" isShowingModal=isShowingAddSoundCloudModal}}

View file

@ -146,7 +146,7 @@
background-color: white; background-color: white;
width: 100%; width: 100%;
height: 350px; height: 350px;
margin: 5px auto; margin: 0 auto;
border-radius: 5px; border-radius: 5px;
transition: 0.1s all ease-in-out; transition: 0.1s all ease-in-out;
position: relative; position: relative;
@ -255,7 +255,10 @@
background: white; background: white;
padding-bottom: 20px; padding-bottom: 20px;
border-bottom-left-radius: 5px; border-bottom-left-radius: 5px;
border-bottom-right-radius: 5px border-bottom-right-radius: 5px;
.md-label {
width: 100%;
}
} }
#beat-container { #beat-container {

View file

@ -7,7 +7,6 @@ module.exports = function(environment) {
environment: environment, environment: environment,
rootURL: '/', rootURL: '/',
locationType: 'hash', locationType: 'hash',
ignoreFailures: false,
EmberENV: { EmberENV: {
FEATURES: { FEATURES: {
// Here you can enable experimental features on an ember canary build // Here you can enable experimental features on an ember canary build
@ -22,7 +21,6 @@ module.exports = function(environment) {
}; };
if (environment === 'development') { if (environment === 'development') {
// ENV.ignoreFailures = true;
// ENV.APP.LOG_RESOLVER = true; // ENV.APP.LOG_RESOLVER = true;
// ENV.APP.LOG_ACTIVE_GENERATION = true; // ENV.APP.LOG_ACTIVE_GENERATION = true;
// ENV.APP.LOG_TRANSITIONS = true; // ENV.APP.LOG_TRANSITIONS = true;

View file

@ -1,100 +1,93 @@
<?xml version="1.0" encoding="UTF-8" standalone="yes"?> <?xml version='1.0' encoding='utf-8'?>
<widget id="com.nidratech.huegasm" version="1.0.0" xmlns="http://www.w3.org/ns/widgets" xmlns:cdv="http://cordova.apache.org/ns/1.0"> <widget id="com.nidratech.huegasm" version="1.0.0" xmlns="http://www.w3.org/ns/widgets" xmlns:cdv="http://cordova.apache.org/ns/1.0">
<name>Huegasm</name> <name>Huegasm</name>
<description> <description>
Huegasm is a free web application for managing and synchronizing your Philips Hue lights with the beat of your music. Huegasm is a free web application for managing and synchronizing your Philips Hue lights with the beat of your music.
</description> </description>
<author email="philippovegor@gmail.com" href="http://www.egorphilippov.me/"> <author email="philippovegor@gmail.com" href="http://www.egorphilippov.me/">
Egor Philippov Egor Philippov
</author> </author>
<content src="index.html"/> <content src="index.html" />
<allow-navigation href="*"/> <plugin name="cordova-plugin-whitelist" spec="1" />
<plugin name="cordova-plugin-whitelist" spec="1"/> <plugin name="cordova-plugin-splashscreen" spec="~4.0.0" />
<plugin name="cordova-plugin-crosswalk-webview" spec="~2.1.0"> <plugin name="ionic-plugin-keyboard" spec="~2.2.1" />
<variable name="XWALK_VERSION" value="21+"/> <access origin="*" />
<variable name="XWALK_LITEVERSION" value="xwalk_core_library_canary:17+"/> <allow-intent href="http://*/*" />
<variable name="XWALK_COMMANDLINE" value="--disable-pull-to-refresh-effect"/> <allow-intent href="https://*/*" />
<variable name="XWALK_MODE" value="embedded"/> <allow-intent href="tel:*" />
<variable name="XWALK_MULTIPLEAPK" value="true"/> <allow-intent href="sms:*" />
</plugin> <allow-intent href="mailto:*" />
<plugin name="cordova-plugin-splashscreen" spec="~4.0.0"/> <allow-intent href="geo:*" />
<plugin name="ionic-plugin-keyboard" spec="~2.2.1"/> <platform name="windows">
<access origin="*"/> <icon src="res/icon/windows/StoreLogo.png" target="StoreLogo" />
<allow-intent href="http://*/*"/> <icon src="res/icon/windows/smalllogo.png" target="Square30x30Logo" />
<allow-intent href="https://*/*"/> <icon src="res/icon/windows/Square44x44Logo.png" target="Square44x44Logo" />
<allow-intent href="tel:*"/> <icon src="res/icon/windows/Square70x70Logo.png" target="Square70x70Logo" />
<allow-intent href="sms:*"/> <icon src="res/icon/windows/Square71x71Logo.png" target="Square71x71Logo" />
<allow-intent href="mailto:*"/> <icon src="res/icon/windows/Square150x150Logo.png" target="Square150x150Logo" />
<allow-intent href="geo:*"/> <icon src="res/icon/windows/Square310x310Logo.png" target="Square310x310Logo" />
<platform name="windows"> </platform>
<icon src="res/icon/windows/StoreLogo.png" target="StoreLogo"/> <platform name="blackberry">
<icon src="res/icon/windows/smalllogo.png" target="Square30x30Logo"/> <icon src="res/icon/blackberry/icon-86.png" />
<icon src="res/icon/windows/Square44x44Logo.png" target="Square44x44Logo"/> <icon src="res/icon/blackberry/icon-150.png" />
<icon src="res/icon/windows/Square70x70Logo.png" target="Square70x70Logo"/> </platform>
<icon src="res/icon/windows/Square71x71Logo.png" target="Square71x71Logo"/> <platform name="ios">
<icon src="res/icon/windows/Square150x150Logo.png" target="Square150x150Logo"/> <allow-intent href="itms:*" />
<icon src="res/icon/windows/Square310x310Logo.png" target="Square310x310Logo"/> <allow-intent href="itms-apps:*" />
</platform> <icon height="40" src="res/icon/ios/icon-40.png" width="40" />
<platform name="blackberry"> <icon height="57" src="res/icon/ios/icon.png" width="57" />
<icon src="res/icon/blackberry/icon-86.png"/> <icon height="80" src="res/icon/ios/icon-40@2x.png" width="80" />
<icon src="res/icon/blackberry/icon-150.png"/> <icon height="120" src="res/icon/ios/icon-40@3x.png" width="120" />
</platform> <icon height="60" src="res/icon/ios/icon-60.png" width="60" />
<platform name="ios"> <icon height="120" src="res/icon/ios/icon-60@2x.png" width="120" />
<allow-intent href="itms:*"/> <icon height="180" src="res/icon/ios/icon-60@3x.png" width="180" />
<allow-intent href="itms-apps:*"/> <icon height="114" src="res/icon/ios/icon@2x.png" width="114" />
<icon height="40" src="res/icon/ios/icon-40.png" width="40"/> <icon height="29" src="res/icon/ios/icon-small.png" width="29" />
<icon height="57" src="res/icon/ios/icon.png" width="57"/> <icon height="58" src="res/icon/ios/icon-small@2x.png" width="58" />
<icon height="80" src="res/icon/ios/icon-40@2x.png" width="80"/> <icon height="87" src="res/icon/ios/icon-small@3x.png" width="87" />
<icon height="120" src="res/icon/ios/icon-40@3x.png" width="120"/> <icon height="152" src="res/icon/ios/icon-76@2x.png" width="152" />
<icon height="60" src="res/icon/ios/icon-60.png" width="60"/> <icon height="76" src="res/icon/ios/icon-76.png" width="76" />
<icon height="120" src="res/icon/ios/icon-60@2x.png" width="120"/> <icon height="72" src="res/icon/ios/icon-72.png" width="72" />
<icon height="180" src="res/icon/ios/icon-60@3x.png" width="180"/> <icon height="144" src="res/icon/ios/icon-72@2x.png" width="144" />
<icon height="114" src="res/icon/ios/icon@2x.png" width="114"/> <icon height="50" src="res/icon/ios/icon-50.png" width="50" />
<icon height="29" src="res/icon/ios/icon-small.png" width="29"/> <icon height="100" src="res/icon/ios/icon-50@2x.png" width="100" />
<icon height="58" src="res/icon/ios/icon-small@2x.png" width="58"/> <splash height="960" src="res/screen/ios/640-960.png" width="640" />
<icon height="87" src="res/icon/ios/icon-small@3x.png" width="87"/> <splash height="640" src="res/screen/ios/960-640.png" width="960" />
<icon height="152" src="res/icon/ios/icon-76@2x.png" width="152"/> <splash height="1136" src="res/screen/ios/640-1136.png" width="640" />
<icon height="76" src="res/icon/ios/icon-76.png" width="76"/> <splash height="640" src="res/screen/ios/1136-640.png" width="1136" />
<icon height="72" src="res/icon/ios/icon-72.png" width="72"/> <splash height="1334" src="res/screen/ios/750-1334.png" width="750" />
<icon height="144" src="res/icon/ios/icon-72@2x.png" width="144"/> <splash height="750" src="res/screen/ios/1334-750.png" width="1334" />
<icon height="50" src="res/icon/ios/icon-50.png" width="50"/> <splash height="2208" src="res/screen/ios/1242-2208.png" width="1242" />
<icon height="100" src="res/icon/ios/icon-50@2x.png" width="100"/> <splash height="1242" src="res/screen/ios/2208-1242.png" width="2208" />
<splash src="res/screen/ios/640-960.png" width="640" height="960"/> <splash height="1024" src="res/screen/ios/768-1024.png" width="768" />
<splash src="res/screen/ios/960-640.png" width="960" height="640"/> <splash height="768" src="res/screen/ios/1024-768.png" width="1024" />
<splash src="res/screen/ios/640-1136.png" width="640" height="1136"/> <splash height="2048" src="res/screen/ios/1536-2048.png" width="1536" />
<splash src="res/screen/ios/1136-640.png" width="1136" height="640"/> <splash height="1536" src="res/screen/ios/2048-1536.png" width="2048" />
<splash src="res/screen/ios/750-1334.png" width="750" height="1334"/> <splash height="2732" src="res/screen/ios/2048-2732.png" width="2048" />
<splash src="res/screen/ios/1334-750.png" width="1334" height="750"/> <splash height="2048" src="res/screen/ios/2732-2048.png" width="2732" />
<splash src="res/screen/ios/1242-2208.png" width="1242" height="2208"/> </platform>
<splash src="res/screen/ios/2208-1242.png" width="2208" height="1242"/> <platform name="android">
<splash src="res/screen/ios/768-1024.png" width="768" height="1024"/> <allow-intent href="market:*" />
<splash src="res/screen/ios/1024-768.png" width="1024" height="768"/> <icon density="ldpi" src="res/icon/android/ldpi.png" />
<splash src="res/screen/ios/1536-2048.png" width="1536" height="2048"/> <icon density="mdpi" src="res/icon/android/mdpi.png" />
<splash src="res/screen/ios/2048-1536.png" width="2048" height="1536"/> <icon density="hdpi" src="res/icon/android/hdpi.png" />
<splash src="res/screen/ios/2048-2732.png" width="2048" height="2732"/> <icon density="xhdpi" src="res/icon/android/xhdpi.png" />
<splash src="res/screen/ios/2732-2048.png" width="2732" height="2048"/> <icon density="xxhdpi" src="res/icon/android/xxhdpi.png" />
</platform> <icon density="xxxhdpi" src="res/icon/android/xxxhdpi.png" />
<platform name="android"> <splash density="port-ldpi" src="res/screen/android/port-ldpi.png" />
<allow-intent href="market:*"/> <splash density="land-ldpi" src="res/screen/android/land-ldpi.png" />
<icon density="ldpi" src="res/icon/android/ldpi.png"/> <splash density="port-mdpi" src="res/screen/android/port-mdpi.png" />
<icon density="mdpi" src="res/icon/android/mdpi.png"/> <splash density="land-mdpi" src="res/screen/android/land-mdpi.png" />
<icon density="hdpi" src="res/icon/android/hdpi.png"/> <splash density="port-hdpi" src="res/screen/android/port-hdpi.png" />
<icon density="xhdpi" src="res/icon/android/xhdpi.png"/> <splash density="land-hdpi" src="res/screen/android/land-hdpi.png" />
<icon density="xxhdpi" src="res/icon/android/xxhdpi.png"/> <splash density="port-xhdpi" src="res/screen/android/port-xhdpi.png" />
<icon density="xxxhdpi" src="res/icon/android/xxxhdpi.png"/> <splash density="land-xhdpi" src="res/screen/android/land-xhdpi.png" />
<splash src="res/screen/android/port-ldpi.png" density="port-ldpi"/> <splash density="port-xxhdpi" src="res/screen/android/port-xxhdpi.png" />
<splash src="res/screen/android/land-ldpi.png" density="land-ldpi"/> <splash density="land-xxhdpi" src="res/screen/android/land-xxhdpi.png" />
<splash src="res/screen/android/port-mdpi.png" density="port-mdpi"/> <splash density="port-xxxhdpi" src="res/screen/android/port-xxxhdpi.png" />
<splash src="res/screen/android/land-mdpi.png" density="land-mdpi"/> <splash density="land-xxxhdpi" src="res/screen/android/land-xxxhdpi.png" />
<splash src="res/screen/android/port-hdpi.png" density="port-hdpi"/> </platform>
<splash src="res/screen/android/land-hdpi.png" density="land-hdpi"/> <engine name="android" spec="~5.2.2" />
<splash src="res/screen/android/port-xhdpi.png" density="port-xhdpi"/> <preference name="ShowSplashScreenSpinner" value="false" />
<splash src="res/screen/android/land-xhdpi.png" density="land-xhdpi"/> <plugin name="com.jiliac.systemvolume" spec="https://github.com/hoboman313/phonegap-plugin-systemvolume" />
<splash src="res/screen/android/port-xxhdpi.png" density="port-xxhdpi"/>
<splash src="res/screen/android/land-xxhdpi.png" density="land-xxhdpi"/>
<splash src="res/screen/android/port-xxxhdpi.png" density="port-xxxhdpi"/>
<splash src="res/screen/android/land-xxxhdpi.png" density="land-xxxhdpi"/>
</platform>
<engine name="android" spec="~5.2.2"/>
<preference name="ShowSplashScreenSpinner" value="false"/>
</widget> </widget>

View file

@ -2,7 +2,8 @@ import Ember from 'ember';
const { const {
Controller, Controller,
isEmpty isEmpty,
$
} = Ember; } = Ember;
export default Controller.extend({ export default Controller.extend({

View file

@ -1,5 +1,4 @@
import Ember from 'ember'; import Ember from 'ember';
import ENV from 'huegasm/config/environment';
const { const {
A, A,
@ -8,6 +7,7 @@ const {
isEmpty, isEmpty,
isNone, isNone,
run, run,
inject,
$ $
} = Ember; } = Ember;
@ -23,6 +23,10 @@ export default Component.extend({
lightsTabSelected: computed.equal('selectedTab', 0), lightsTabSelected: computed.equal('selectedTab', 0),
musicTabSelected: computed.equal('selectedTab', 1), musicTabSelected: computed.equal('selectedTab', 1),
displayFailure: true,
notify: inject.service(),
dimmerOnClass: computed('dimmerOn', function(){ dimmerOnClass: computed('dimmerOn', function(){
return this.get('dimmerOn') ? 'dimmerOn md-menu-origin' : 'md-menu-origin'; return this.get('dimmerOn') ? 'dimmerOn md-menu-origin' : 'md-menu-origin';
}), }),
@ -85,9 +89,11 @@ export default Component.extend({
updateLightData(){ updateLightData(){
let fail = ()=>{ let fail = ()=>{
if(!ENV.ignoreFailures) { if(this.get('displayFailure')){
clearInterval(this.get('lightsDataIntervalHandle')); this.get('notify').warning({html: '<div class="alert alert-warning" role="alert">Error retrieving data from your lights. Yikes.</div>'});
this.send('clearBridge'); this.set('displayFailure', false);
setTimeout(()=>{ this.set('displayFailure', true); }, 30000);
} }
}; };

View file

@ -32,8 +32,10 @@
{{light-group lightsData=lightsData activeLights=activeLights syncLight=syncLight apiURL=apiURL dimmerOn=dimmerOn storage=storage}} {{light-group lightsData=lightsData activeLights=activeLights syncLight=syncLight apiURL=apiURL dimmerOn=dimmerOn storage=storage}}
<div class="row"> <div class="row">
{{lights-tab apiURL=apiURL lightsData=lightsData activeLights=activeLights syncLight=syncLight trial=trial active=lightsTabSelected colorLoopOn=colorLoopOn dimmerOn=dimmerOn strobeOn=pauseLightUpdates}} {{lights-tab apiURL=apiURL lightsData=lightsData activeLights=activeLights syncLight=syncLight trial=trial active=lightsTabSelected colorLoopOn=colorLoopOn dimmerOn=dimmerOn playing=playing pauseLightUpdates=pauseLightUpdates}}
{{music-tab apiURL=apiURL lightsData=lightsData activeLights=activeLights active=musicTabSelected pauseLightUpdates=pauseLightUpdates dimmerOn=dimmerOn storage=storage colorLoopOn=colorLoopOn action="startIntro"}} {{music-tab apiURL=apiURL lightsData=lightsData activeLights=activeLights active=musicTabSelected pauseLightUpdates=pauseLightUpdates dimmerOn=dimmerOn storage=storage colorLoopOn=colorLoopOn playing=playing action="startIntro"}}
</div> </div>
{{/if}} {{/if}}
{{ember-notify messageStyle='bootstrap' closeAfter=5000}}

View file

@ -172,9 +172,10 @@ export default Component.extend({
lastStrobeLight: 0, lastStrobeLight: 0,
onStrobeOnChange: observer('strobeOn', function () { onStrobeOnChange: observer('strobeOn', function () {
let lightsData = this.get('lightsData'); let lightsData = this.get('lightsData'),
strobeOn = this.get('strobeOn');
if (this.get('strobeOn')) { if (strobeOn) {
this.set('preStrobeOnLightsDataCache', lightsData); this.set('preStrobeOnLightsDataCache', lightsData);
let stobeInitRequestData = {'sat': this.get('strobeSat'), 'transitiontime': 0}; let stobeInitRequestData = {'sat': this.get('strobeSat'), 'transitiontime': 0};
@ -214,6 +215,8 @@ export default Component.extend({
setTimeout(()=>{this.onColorLoopOnChange();}, 2000); setTimeout(()=>{this.onColorLoopOnChange();}, 2000);
clearInterval(this.get('strobeOnInervalHandle')); clearInterval(this.get('strobeOnInervalHandle'));
} }
this.set('pauseLightUpdates', strobeOn);
}), }),
strobeStep() { strobeStep() {

View file

@ -2,7 +2,7 @@
{{#paper-item}} {{#paper-item}}
{{paper-icon "power-settings-new" class=dimmerOnClass}} {{paper-icon "power-settings-new" class=dimmerOnClass}}
<p data-toggle="tooltip" data-placement="top auto" class="bootstrap-tooltip lights-control-tooltip" data-title="Turn the selected lights on/off">Power</p> <p data-toggle="tooltip" data-placement="top auto" class="bootstrap-tooltip lights-control-tooltip" data-title="Turn the selected lights on/off">Power</p>
{{paper-switch value=lightsOn onChange=(action (mut lightsOn)) disabled=trial skipProxy=trial label=lightsOnTxt}} {{paper-switch value=lightsOn onChange=(action (mut lightsOn)) disabled=(or trial playing) skipProxy=trial label=lightsOnTxt}}
{{/paper-item}} {{/paper-item}}
{{#paper-item}} {{#paper-item}}
@ -18,7 +18,7 @@
{{#paper-menu offset="0 -50" as |menu|}} {{#paper-menu offset="0 -50" as |menu|}}
{{#menu.trigger}} {{#menu.trigger}}
{{#paper-button iconButton=false}} {{#paper-button iconButton=false}}
{{paper-button raised=true class="color" disabled=trial}} {{paper-button raised=true class="color" disabled=(or trial playing)}}
{{/paper-button}} {{/paper-button}}
{{/menu.trigger}} {{/menu.trigger}}
{{#menu.content class="color-content" width=0 as |content|}} {{#menu.content class="color-content" width=0 as |content|}}
@ -32,12 +32,12 @@
{{#paper-item}} {{#paper-item}}
{{paper-icon "flare" class=dimmerOnClass}} {{paper-icon "flare" class=dimmerOnClass}}
<p data-toggle="tooltip" data-placement="top auto" class="bootstrap-tooltip lights-control-tooltip" data-title="Selected lights will flash in sequential order">Strobe</p> <p data-toggle="tooltip" data-placement="top auto" class="bootstrap-tooltip lights-control-tooltip" data-title="Selected lights will flash in sequential order">Strobe</p>
{{paper-switch value=strobeOn onChange=(action (mut strobeOn)) disabled=trial skipProxy=trial label=strobeOnTxt}} {{paper-switch value=strobeOn onChange=(action (mut strobeOn)) disabled=(or trial playing) skipProxy=trial label=strobeOnTxt}}
{{/paper-item}} {{/paper-item}}
{{#paper-item}} {{#paper-item}}
{{paper-icon "color-lens" class=dimmerOnClass}} {{paper-icon "loop" id="loop-addition" class=dimmerOnClass}} {{paper-icon "color-lens" class=dimmerOnClass}} {{paper-icon "loop" id="loop-addition" class=dimmerOnClass}}
<p data-toggle="tooltip" data-placement="top auto" class="bootstrap-tooltip lights-control-tooltip" data-title="Selected lights will slowly cycle through all the colors">Colorloop</p> <p data-toggle="tooltip" data-placement="top auto" class="bootstrap-tooltip lights-control-tooltip" data-title="Selected lights will slowly cycle through all the colors">Colorloop</p>
{{paper-switch value=colorLoopOn onChange=(action (mut colorLoopOn)) disabled=trial skipProxy=trial label=colorloopOnTxt}} {{paper-switch value=colorLoopOn onChange=(action (mut colorLoopOn)) disabled=(or trial playing) skipProxy=trial label=colorloopOnTxt}}
{{/paper-item}} {{/paper-item}}
{{/paper-list}} {{/paper-list}}

View file

@ -646,10 +646,11 @@ export default Component.extend(helperMixin, visualizerMixin, {
}, },
play(replayPause) { play(replayPause) {
let dancer = this.get('dancer'), let dancer = this.get('dancer'),
playQueuePointer = this.get('playQueuePointer'); playQueuePointer = this.get('playQueuePointer'),
playing = this.get('playing');
if(playQueuePointer !== -1 ) { if(playQueuePointer !== -1 ) {
if (this.get('playing')) { if (playing) {
dancer.pause(); dancer.pause();
if(!replayPause){ if(!replayPause){
@ -675,6 +676,7 @@ export default Component.extend(helperMixin, visualizerMixin, {
dancer.play(); dancer.play();
} }
this.set('pauseLightUpdates', !playing);
this.onColorloopModeChange(); this.onColorloopModeChange();
this.toggleProperty('playing'); this.toggleProperty('playing');
} }

View file

@ -18,7 +18,7 @@ export default Mixin.create({
dancer: null, dancer: null,
notify: inject.service('notify'), notify: inject.service(),
beatOptions: { beatOptions: {
threshold: { threshold: {
@ -200,18 +200,12 @@ export default Mixin.create({
let song = playQueue[playQueuePointer]; let song = playQueue[playQueuePointer];
if(song.scUrl && !isNone(song.picture)){ if(song.scUrl && !isNone(song.picture)){
pic = song.picture.replace('67x67', '500x500'); pic = song.picture.replace('67x67', '500x500');
} else {
pic = song.picture;
} }
} }
return pic; return pic;
}), }),
pauseLightUpdates: computed('playing', function(){
return this.get('playing');
}),
micIcon: computed('usingMicAudio', function(){ micIcon: computed('usingMicAudio', function(){
if(this.get('usingMicAudio')) { if(this.get('usingMicAudio')) {
return 'mic'; return 'mic';

View file

@ -172,13 +172,13 @@
</div> </div>
{{#if usingMicAudio}} {{#if usingMicAudio}}
<div class="beat-option col-xs-4"> <div class="beat-option col-xs-4">
<span data-toggle="tooltip" data-placement="top" data-title="The coefficient to boost the microphone signal by" class="option-description bootstrap-tooltip"> <span data-toggle="tooltip" data-placement="top" data-title="The coefficient to boost the microphone signal by" class="option-description bootstrap-tooltip">
Mic Boost Mic Boost
</span> </span>
{{range-slider start=micBoost orientation="vertical" step=beatOptions.micBoost.step range=beatOptions.micBoost.range on-slide="micBoostChanged" pips=beatOptions.micBoost.pips}} {{range-slider start=micBoost orientation="vertical" step=beatOptions.micBoost.step range=beatOptions.micBoost.range on-slide="micBoostChanged" pips=beatOptions.micBoost.pips}}
</div> </div>
{{/if}} {{/if}}
<div id="light-option" class="beat-option col-sm-4 col-xs-12"> <div id="light-option" class="beat-option col-sm-4 col-xs-12">
@ -189,10 +189,6 @@
<span data-toggle="tooltip" data-placement="top auto" data-title="Slowly cycle the lights through all the colors" class="bootstrap-tooltip" {{action "hideTooltip" on="mouseLeave"}}> <span data-toggle="tooltip" data-placement="top auto" data-title="Slowly cycle the lights through all the colors" class="bootstrap-tooltip" {{action "hideTooltip" on="mouseLeave"}}>
{{paper-checkbox value=colorloopMode onChange=(action (mut colorloopMode)) label="Colorloop"}} {{paper-checkbox value=colorloopMode onChange=(action (mut colorloopMode)) label="Colorloop"}}
</span> </span>
{{!--<span data-toggle="tooltip" data-placement="bottom auto" data-title="Periodically turn the lights on and off to create a cool looking ambience" class="bootstrap-tooltip" {{action "hideTooltip" on="mouseLeave"}}>
{{#paper-checkbox checked=ambienceMode}}Ambience{{/paper-checkbox}}
</span>--}}
</div> </div>
</div> </div>
</div> </div>
@ -215,6 +211,4 @@
</div> </div>
</div> </div>
{{ember-notify messageStyle='bootstrap' closeAfter=5000}}
{{music-tab/add-soundcloud-sound-modal action="handleNewSoundCloudURL" isShowingModal=isShowingAddSoundCloudModal}} {{music-tab/add-soundcloud-sound-modal action="handleNewSoundCloudURL" isShowingModal=isShowingAddSoundCloudModal}}

View file

@ -81,25 +81,28 @@ div.ember-modal-dialog {
} }
} }
// fancy webkit scrollbars // fancy webkit scrollbars
::-webkit-scrollbar { @media(min-width:767px) {
-webkit-appearance: none; ::-webkit-scrollbar {
-webkit-appearance: none;
}
::-webkit-scrollbar:vertical {
width: 12px;
}
::-webkit-scrollbar:horizontal {
height: 12px;
}
::-webkit-scrollbar-thumb {
background-color: rgba(0, 0, 0, .5);
border-radius: 10px;
border: 2px solid #ffffff;
-webkit-box-shadow: inset 0 0 6px rgba(0,0,0,0.5);
}
::-webkit-scrollbar-track {
background-color: #ffffff;
}
} }
::-webkit-scrollbar:vertical {
width: 12px;
}
::-webkit-scrollbar:horizontal {
height: 12px;
}
::-webkit-scrollbar-thumb {
background-color: rgba(0, 0, 0, .5);
border-radius: 10px;
border: 2px solid #ffffff;
-webkit-box-shadow: inset 0 0 6px rgba(0,0,0,0.5);
}
::-webkit-scrollbar-track {
background-color: #ffffff;
}

View file

@ -171,7 +171,7 @@
background-color: white; background-color: white;
width: 100%; width: 100%;
height: 350px; height: 350px;
margin: 5px auto; margin: 0 auto;
border-radius: 5px; border-radius: 5px;
transition: 0.1s all ease-in-out; transition: 0.1s all ease-in-out;
position: relative; position: relative;
@ -279,6 +279,7 @@
#light-option { #light-option {
margin-top: 67px; margin-top: 67px;
transform: translateY(25%);
} }
.beat-option { .beat-option {
@ -445,6 +446,9 @@
@media(max-width:767px) { @media(max-width:767px) {
#light-option { #light-option {
margin-top: 0; margin-top: 0;
.md-label {
width: auto;
}
} }
#beat-area { #beat-area {
height: initial; height: initial;

View file

@ -7,7 +7,6 @@ module.exports = function(environment) {
environment: environment, environment: environment,
rootURL: '/', rootURL: '/',
locationType: 'auto', locationType: 'auto',
ignoreFailures: false,
EmberENV: { EmberENV: {
FEATURES: { FEATURES: {
// Here you can enable experimental features on an ember canary build // Here you can enable experimental features on an ember canary build
@ -22,7 +21,6 @@ module.exports = function(environment) {
}; };
if (environment === 'development') { if (environment === 'development') {
// ENV.ignoreFailures = true;
// ENV.APP.LOG_RESOLVER = true; // ENV.APP.LOG_RESOLVER = true;
// ENV.APP.LOG_ACTIVE_GENERATION = true; // ENV.APP.LOG_ACTIVE_GENERATION = true;
// ENV.APP.LOG_TRANSITIONS = true; // ENV.APP.LOG_TRANSITIONS = true;