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

This commit is contained in:
Egor 2016-11-22 01:07:15 -08:00
parent f63aded87a
commit 108e7be16c
24 changed files with 236 additions and 253 deletions

View file

@ -46,6 +46,12 @@ export default Component.extend({
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
@ -120,6 +126,10 @@ export default Component.extend({
},
actions: {
tryAgain() {
this.get('storage').clear();
location.reload();
},
retry(){
this.onBridgeIpChange();
},

View file

@ -2,9 +2,9 @@
{{#unless bridgeUsername}}
{{#if bridgeIp}}
{{#if error}}
<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>
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>Huegasm encountered a critical error while trying to connect to your bridge.<br><br>
<a href="#" {{action "tryAgain"}}>TRY AGAIN</a>
</p>
{{else}}
<img src="assets/images/pressButtonBridge.png" id="press-bridge-button-img">
{{paper-progress-linear warn=true value=bridgeUserNamePingIntervalProgress}}

View file

@ -1,5 +1,4 @@
import Ember from 'ember';
import ENV from 'huegasm_mobile/config/environment';
const {
A,
@ -7,6 +6,7 @@ const {
computed,
isNone,
run,
inject,
$
} = Ember;
@ -22,6 +22,11 @@ export default Component.extend({
lightsTabSelected: computed.equal('selectedTab', 0),
musicTabSelected: computed.equal('selectedTab', 1),
dimmerOn: false,
playing: false,
displayFailure: true,
notify: inject.service(),
dimmerOnClass: computed('dimmerOn', function(){
let dimmerOn = this.get('dimmerOn'),
@ -83,13 +88,29 @@ export default Component.extend({
if (!isNone(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(){
let fail = ()=>{
if(!ENV.ignoreFailures) {
clearInterval(this.get('lightsDataIntervalHandle'));
this.send('clearBridge');
if(this.get('displayFailure')){
this.get('notify').warning({html: '<div class="alert alert-warning" role="alert">Error retrieving data from your lights. Yikes.</div>'});
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}}
{{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"}}
{{/if}}
{{music-tab apiURL=apiURL lightsData=lightsData activeLights=activeLights active=musicTabSelected pauseLightUpdates=pauseLightUpdates dimmerOn=dimmerOn playing=playing storage=storage colorLoopOn=colorLoopOn action="startIntro"}}
{{/if}}
{{ember-notify messageStyle='bootstrap' closeAfter=5000}}

View file

@ -171,9 +171,10 @@ export default Component.extend({
lastStrobeLight: 0,
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);
let stobeInitRequestData = {'sat': this.get('strobeSat'), 'transitiontime': 0};
@ -213,6 +214,8 @@ export default Component.extend({
setTimeout(()=>{this.onColorLoopOnChange();}, 2000);
clearInterval(this.get('strobeOnInervalHandle'));
}
this.set('pauseLightUpdates', strobeOn);
}),
strobeStep() {

View file

@ -2,7 +2,7 @@
{{#paper-item}}
{{paper-icon "power-settings-new" class=dimmerOnClass}}
<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}}
@ -17,7 +17,7 @@
{{#paper-menu offset="0 -100" as |menu|}}
{{#menu.trigger}}
{{#paper-button iconButton=false}}
{{paper-button raised=true class="color" disabled=trial}}
{{paper-button raised=true class="color" disabled=(or trial playing)}}
{{/paper-button}}
{{/menu.trigger}}
{{#menu.content class="color-content" width=8 as |content|}}
@ -31,12 +31,12 @@
{{#paper-item}}
{{paper-icon "flare" class=dimmerOnClass}}
<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-icon "color-lens" class=dimmerOnClass}} {{paper-icon "loop" id="loop-addition" class=dimmerOnClass}}
<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-list}}

View file

@ -1,7 +1,7 @@
{{#if isShowingModal}}
{{#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>
{{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) {
let dancer = this.get('dancer');
@ -327,11 +287,8 @@ export default Component.extend(helperMixin, visualizerMixin, {
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))) {
let itemVal = storage.get('huegasm.' + item);
@ -346,6 +303,26 @@ export default Component.extend(helperMixin, visualizerMixin, {
SC.initialize({
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() {
@ -498,7 +475,6 @@ export default Component.extend(helperMixin, visualizerMixin, {
if(this.get('playQueuePointer') !== -1) {
this.send('goToSong', this.get('playQueuePointer'));
this.send('volumeChanged', this.get('volume'));
}
// 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';
},
useMicAudio() {
if(this.get('usingMicAudio')) {
this.send('useLocalAudio');
} else {
this.startUsingMic();
}
},
slideTogglePlayerBottom(){
let elem = this.$('#player-bottom');
@ -603,10 +572,11 @@ export default Component.extend(helperMixin, visualizerMixin, {
},
play(replayPause) {
let dancer = this.get('dancer'),
playQueuePointer = this.get('playQueuePointer');
playQueuePointer = this.get('playQueuePointer'),
playing = this.get('playing');
if(playQueuePointer !== -1 ) {
if (this.get('playing')) {
if (playing) {
dancer.pause();
if(!replayPause){
@ -626,16 +596,11 @@ export default Component.extend(helperMixin, visualizerMixin, {
dancer.play();
}
this.set('pauseLightUpdates', !playing);
this.onColorloopModeChange();
this.toggleProperty('playing');
}
},
volumeChanged(value) {
this.changePlayerControl('volume', value);
if(this.get('playing')) {
this.get('dancer').setVolume(value/100);
}
},
next(repeatAll) {
let playQueuePointer = this.get('playQueuePointer'),
playQueue = this.get('playQueue'),
@ -744,15 +709,9 @@ export default Component.extend(helperMixin, visualizerMixin, {
micBoostChanged(value) {
this.set('micBoost', value);
this.get('storage').set('huegasm.micBoost', value);
if(this.get('usingMicAudio')) {
this.get('dancer').setBoost(value);
}
},
audioModeChanged(value){
if(value === 1) {
this.startUsingMic();
} else if(value === 0) {
if(value === 0) {
this.send('useLocalAudio');
} else {
this.set('audioMode', value);

View file

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

View file

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

View file

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

View file

@ -7,7 +7,6 @@ module.exports = function(environment) {
environment: environment,
rootURL: '/',
locationType: 'hash',
ignoreFailures: false,
EmberENV: {
FEATURES: {
// Here you can enable experimental features on an ember canary build
@ -22,7 +21,6 @@ module.exports = function(environment) {
};
if (environment === 'development') {
// ENV.ignoreFailures = true;
// ENV.APP.LOG_RESOLVER = true;
// ENV.APP.LOG_ACTIVE_GENERATION = 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">
<name>Huegasm</name>
<description>
<name>Huegasm</name>
<description>
Huegasm is a free web application for managing and synchronizing your Philips Hue lights with the beat of your music.
</description>
<author email="philippovegor@gmail.com" href="http://www.egorphilippov.me/">
<author email="philippovegor@gmail.com" href="http://www.egorphilippov.me/">
Egor Philippov
</author>
<content src="index.html"/>
<allow-navigation href="*"/>
<plugin name="cordova-plugin-whitelist" spec="1"/>
<plugin name="cordova-plugin-crosswalk-webview" spec="~2.1.0">
<variable name="XWALK_VERSION" value="21+"/>
<variable name="XWALK_LITEVERSION" value="xwalk_core_library_canary:17+"/>
<variable name="XWALK_COMMANDLINE" value="--disable-pull-to-refresh-effect"/>
<variable name="XWALK_MODE" value="embedded"/>
<variable name="XWALK_MULTIPLEAPK" value="true"/>
</plugin>
<plugin name="cordova-plugin-splashscreen" spec="~4.0.0"/>
<plugin name="ionic-plugin-keyboard" spec="~2.2.1"/>
<access origin="*"/>
<allow-intent href="http://*/*"/>
<allow-intent href="https://*/*"/>
<allow-intent href="tel:*"/>
<allow-intent href="sms:*"/>
<allow-intent href="mailto:*"/>
<allow-intent href="geo:*"/>
<platform name="windows">
<icon src="res/icon/windows/StoreLogo.png" target="StoreLogo"/>
<icon src="res/icon/windows/smalllogo.png" target="Square30x30Logo"/>
<icon src="res/icon/windows/Square44x44Logo.png" target="Square44x44Logo"/>
<icon src="res/icon/windows/Square70x70Logo.png" target="Square70x70Logo"/>
<icon src="res/icon/windows/Square71x71Logo.png" target="Square71x71Logo"/>
<icon src="res/icon/windows/Square150x150Logo.png" target="Square150x150Logo"/>
<icon src="res/icon/windows/Square310x310Logo.png" target="Square310x310Logo"/>
</platform>
<platform name="blackberry">
<icon src="res/icon/blackberry/icon-86.png"/>
<icon src="res/icon/blackberry/icon-150.png"/>
</platform>
<platform name="ios">
<allow-intent href="itms:*"/>
<allow-intent href="itms-apps:*"/>
<icon height="40" src="res/icon/ios/icon-40.png" width="40"/>
<icon height="57" src="res/icon/ios/icon.png" width="57"/>
<icon height="80" src="res/icon/ios/icon-40@2x.png" width="80"/>
<icon height="120" src="res/icon/ios/icon-40@3x.png" width="120"/>
<icon height="60" src="res/icon/ios/icon-60.png" width="60"/>
<icon height="120" src="res/icon/ios/icon-60@2x.png" width="120"/>
<icon height="180" src="res/icon/ios/icon-60@3x.png" width="180"/>
<icon height="114" src="res/icon/ios/icon@2x.png" width="114"/>
<icon height="29" src="res/icon/ios/icon-small.png" width="29"/>
<icon height="58" src="res/icon/ios/icon-small@2x.png" width="58"/>
<icon height="87" src="res/icon/ios/icon-small@3x.png" width="87"/>
<icon height="152" src="res/icon/ios/icon-76@2x.png" width="152"/>
<icon height="76" src="res/icon/ios/icon-76.png" width="76"/>
<icon height="72" src="res/icon/ios/icon-72.png" width="72"/>
<icon height="144" src="res/icon/ios/icon-72@2x.png" width="144"/>
<icon height="50" src="res/icon/ios/icon-50.png" width="50"/>
<icon height="100" src="res/icon/ios/icon-50@2x.png" width="100"/>
<splash src="res/screen/ios/640-960.png" width="640" height="960"/>
<splash src="res/screen/ios/960-640.png" width="960" height="640"/>
<splash src="res/screen/ios/640-1136.png" width="640" height="1136"/>
<splash src="res/screen/ios/1136-640.png" width="1136" height="640"/>
<splash src="res/screen/ios/750-1334.png" width="750" height="1334"/>
<splash src="res/screen/ios/1334-750.png" width="1334" height="750"/>
<splash src="res/screen/ios/1242-2208.png" width="1242" height="2208"/>
<splash src="res/screen/ios/2208-1242.png" width="2208" height="1242"/>
<splash src="res/screen/ios/768-1024.png" width="768" height="1024"/>
<splash src="res/screen/ios/1024-768.png" width="1024" height="768"/>
<splash src="res/screen/ios/1536-2048.png" width="1536" height="2048"/>
<splash src="res/screen/ios/2048-1536.png" width="2048" height="1536"/>
<splash src="res/screen/ios/2048-2732.png" width="2048" height="2732"/>
<splash src="res/screen/ios/2732-2048.png" width="2732" height="2048"/>
</platform>
<platform name="android">
<allow-intent href="market:*"/>
<icon density="ldpi" src="res/icon/android/ldpi.png"/>
<icon density="mdpi" src="res/icon/android/mdpi.png"/>
<icon density="hdpi" src="res/icon/android/hdpi.png"/>
<icon density="xhdpi" src="res/icon/android/xhdpi.png"/>
<icon density="xxhdpi" src="res/icon/android/xxhdpi.png"/>
<icon density="xxxhdpi" src="res/icon/android/xxxhdpi.png"/>
<splash src="res/screen/android/port-ldpi.png" density="port-ldpi"/>
<splash src="res/screen/android/land-ldpi.png" density="land-ldpi"/>
<splash src="res/screen/android/port-mdpi.png" density="port-mdpi"/>
<splash src="res/screen/android/land-mdpi.png" density="land-mdpi"/>
<splash src="res/screen/android/port-hdpi.png" density="port-hdpi"/>
<splash src="res/screen/android/land-hdpi.png" density="land-hdpi"/>
<splash src="res/screen/android/port-xhdpi.png" density="port-xhdpi"/>
<splash src="res/screen/android/land-xhdpi.png" density="land-xhdpi"/>
<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"/>
<content src="index.html" />
<plugin name="cordova-plugin-whitelist" spec="1" />
<plugin name="cordova-plugin-splashscreen" spec="~4.0.0" />
<plugin name="ionic-plugin-keyboard" spec="~2.2.1" />
<access origin="*" />
<allow-intent href="http://*/*" />
<allow-intent href="https://*/*" />
<allow-intent href="tel:*" />
<allow-intent href="sms:*" />
<allow-intent href="mailto:*" />
<allow-intent href="geo:*" />
<platform name="windows">
<icon src="res/icon/windows/StoreLogo.png" target="StoreLogo" />
<icon src="res/icon/windows/smalllogo.png" target="Square30x30Logo" />
<icon src="res/icon/windows/Square44x44Logo.png" target="Square44x44Logo" />
<icon src="res/icon/windows/Square70x70Logo.png" target="Square70x70Logo" />
<icon src="res/icon/windows/Square71x71Logo.png" target="Square71x71Logo" />
<icon src="res/icon/windows/Square150x150Logo.png" target="Square150x150Logo" />
<icon src="res/icon/windows/Square310x310Logo.png" target="Square310x310Logo" />
</platform>
<platform name="blackberry">
<icon src="res/icon/blackberry/icon-86.png" />
<icon src="res/icon/blackberry/icon-150.png" />
</platform>
<platform name="ios">
<allow-intent href="itms:*" />
<allow-intent href="itms-apps:*" />
<icon height="40" src="res/icon/ios/icon-40.png" width="40" />
<icon height="57" src="res/icon/ios/icon.png" width="57" />
<icon height="80" src="res/icon/ios/icon-40@2x.png" width="80" />
<icon height="120" src="res/icon/ios/icon-40@3x.png" width="120" />
<icon height="60" src="res/icon/ios/icon-60.png" width="60" />
<icon height="120" src="res/icon/ios/icon-60@2x.png" width="120" />
<icon height="180" src="res/icon/ios/icon-60@3x.png" width="180" />
<icon height="114" src="res/icon/ios/icon@2x.png" width="114" />
<icon height="29" src="res/icon/ios/icon-small.png" width="29" />
<icon height="58" src="res/icon/ios/icon-small@2x.png" width="58" />
<icon height="87" src="res/icon/ios/icon-small@3x.png" width="87" />
<icon height="152" src="res/icon/ios/icon-76@2x.png" width="152" />
<icon height="76" src="res/icon/ios/icon-76.png" width="76" />
<icon height="72" src="res/icon/ios/icon-72.png" width="72" />
<icon height="144" src="res/icon/ios/icon-72@2x.png" width="144" />
<icon height="50" src="res/icon/ios/icon-50.png" width="50" />
<icon height="100" src="res/icon/ios/icon-50@2x.png" width="100" />
<splash height="960" src="res/screen/ios/640-960.png" width="640" />
<splash height="640" src="res/screen/ios/960-640.png" width="960" />
<splash height="1136" src="res/screen/ios/640-1136.png" width="640" />
<splash height="640" src="res/screen/ios/1136-640.png" width="1136" />
<splash height="1334" src="res/screen/ios/750-1334.png" width="750" />
<splash height="750" src="res/screen/ios/1334-750.png" width="1334" />
<splash height="2208" src="res/screen/ios/1242-2208.png" width="1242" />
<splash height="1242" src="res/screen/ios/2208-1242.png" width="2208" />
<splash height="1024" src="res/screen/ios/768-1024.png" width="768" />
<splash height="768" src="res/screen/ios/1024-768.png" width="1024" />
<splash height="2048" src="res/screen/ios/1536-2048.png" width="1536" />
<splash height="1536" src="res/screen/ios/2048-1536.png" width="2048" />
<splash height="2732" src="res/screen/ios/2048-2732.png" width="2048" />
<splash height="2048" src="res/screen/ios/2732-2048.png" width="2732" />
</platform>
<platform name="android">
<allow-intent href="market:*" />
<icon density="ldpi" src="res/icon/android/ldpi.png" />
<icon density="mdpi" src="res/icon/android/mdpi.png" />
<icon density="hdpi" src="res/icon/android/hdpi.png" />
<icon density="xhdpi" src="res/icon/android/xhdpi.png" />
<icon density="xxhdpi" src="res/icon/android/xxhdpi.png" />
<icon density="xxxhdpi" src="res/icon/android/xxxhdpi.png" />
<splash density="port-ldpi" src="res/screen/android/port-ldpi.png" />
<splash density="land-ldpi" src="res/screen/android/land-ldpi.png" />
<splash density="port-mdpi" src="res/screen/android/port-mdpi.png" />
<splash density="land-mdpi" src="res/screen/android/land-mdpi.png" />
<splash density="port-hdpi" src="res/screen/android/port-hdpi.png" />
<splash density="land-hdpi" src="res/screen/android/land-hdpi.png" />
<splash density="port-xhdpi" src="res/screen/android/port-xhdpi.png" />
<splash density="land-xhdpi" src="res/screen/android/land-xhdpi.png" />
<splash density="port-xxhdpi" src="res/screen/android/port-xxhdpi.png" />
<splash density="land-xxhdpi" src="res/screen/android/land-xxhdpi.png" />
<splash density="port-xxxhdpi" src="res/screen/android/port-xxxhdpi.png" />
<splash density="land-xxxhdpi" src="res/screen/android/land-xxxhdpi.png" />
</platform>
<engine name="android" spec="~5.2.2" />
<preference name="ShowSplashScreenSpinner" value="false" />
<plugin name="com.jiliac.systemvolume" spec="https://github.com/hoboman313/phonegap-plugin-systemvolume" />
</widget>

View file

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

View file

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

View file

@ -172,9 +172,10 @@ export default Component.extend({
lastStrobeLight: 0,
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);
let stobeInitRequestData = {'sat': this.get('strobeSat'), 'transitiontime': 0};
@ -214,6 +215,8 @@ export default Component.extend({
setTimeout(()=>{this.onColorLoopOnChange();}, 2000);
clearInterval(this.get('strobeOnInervalHandle'));
}
this.set('pauseLightUpdates', strobeOn);
}),
strobeStep() {

View file

@ -2,7 +2,7 @@
{{#paper-item}}
{{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>
{{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}}
@ -18,7 +18,7 @@
{{#paper-menu offset="0 -50" as |menu|}}
{{#menu.trigger}}
{{#paper-button iconButton=false}}
{{paper-button raised=true class="color" disabled=trial}}
{{paper-button raised=true class="color" disabled=(or trial playing)}}
{{/paper-button}}
{{/menu.trigger}}
{{#menu.content class="color-content" width=0 as |content|}}
@ -32,12 +32,12 @@
{{#paper-item}}
{{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>
{{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-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>
{{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-list}}

View file

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

View file

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

View file

@ -172,13 +172,13 @@
</div>
{{#if usingMicAudio}}
<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">
Mic Boost
</span>
<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">
Mic Boost
</span>
{{range-slider start=micBoost orientation="vertical" step=beatOptions.micBoost.step range=beatOptions.micBoost.range on-slide="micBoostChanged" pips=beatOptions.micBoost.pips}}
</div>
{{range-slider start=micBoost orientation="vertical" step=beatOptions.micBoost.step range=beatOptions.micBoost.range on-slide="micBoostChanged" pips=beatOptions.micBoost.pips}}
</div>
{{/if}}
<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"}}>
{{paper-checkbox value=colorloopMode onChange=(action (mut colorloopMode)) label="Colorloop"}}
</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>
@ -215,6 +211,4 @@
</div>
</div>
{{ember-notify messageStyle='bootstrap' closeAfter=5000}}
{{music-tab/add-soundcloud-sound-modal action="handleNewSoundCloudURL" isShowingModal=isShowingAddSoundCloudModal}}

View file

@ -81,25 +81,28 @@ div.ember-modal-dialog {
}
}
// fancy webkit scrollbars
::-webkit-scrollbar {
-webkit-appearance: none;
@media(min-width:767px) {
::-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;
width: 100%;
height: 350px;
margin: 5px auto;
margin: 0 auto;
border-radius: 5px;
transition: 0.1s all ease-in-out;
position: relative;
@ -279,6 +279,7 @@
#light-option {
margin-top: 67px;
transform: translateY(25%);
}
.beat-option {
@ -445,6 +446,9 @@
@media(max-width:767px) {
#light-option {
margin-top: 0;
.md-label {
width: auto;
}
}
#beat-area {
height: initial;

View file

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