music wip

This commit is contained in:
Egor 2015-08-31 02:19:26 -07:00
parent c430e724a5
commit 44feb8273e
5 changed files with 47 additions and 3 deletions

View file

@ -15,6 +15,10 @@ export default Em.Component.extend({
this.set('status', 'playing'); this.set('status', 'playing');
} }
}, },
volumeSliderChanged: function(){
},
next : function(){ next : function(){
}, },
@ -36,6 +40,7 @@ export default Em.Component.extend({
playQueue: [], playQueue: [],
timeElapsed: '0:00', timeElapsed: '0:00',
timeRemaining: '0:00', timeRemaining: '0:00',
volume: 100,
playButton: function(){ playButton: function(){
if(this.get('status') === 'playing'){ if(this.get('status') === 'playing'){
@ -85,6 +90,10 @@ export default Em.Component.extend({
kick.on(); kick.on();
if(localStorage.getItem('huegasm.volume')){
this.set('volume', localStorage.getItem('huegasm.volume'));
}
this.setProperties({ this.setProperties({
dancer: dancer, dancer: dancer,
kick: kick kick: kick

View file

@ -213,5 +213,37 @@ md-toolbar {
#playlist { #playlist {
height: 300px; height: 300px;
background-color: grey; background-color: grey;
display: inline-block; }
.volumeButtonHover {
}
.noUi-origin {
background-color: black;
}
.noUi-base {
background-color: red;
}
.noUi-target {
width: 100px;
height: 5px;
display: inline-block;
visibility: hidden;
}
.noUi-horizontal .noUi-handle {
width: 4px;
height: 20px;
left: 0;
top: -8px;
}
.noUi-handle:after, .noUi-handle:before {
content: none;
}
.volumeButton:hover + .noUi-target {
visibility:visible;
} }

View file

@ -12,7 +12,8 @@
<span {{action "next"}}>{{paper-icon icon="skip-next" action="" class="playerControllIcon"}}</span> <span {{action "next"}}>{{paper-icon icon="skip-next" action="" class="playerControllIcon"}}</span>
{{/if}} {{/if}}
{{paper-icon icon="volume-up" class="playerControllIcon"}} {{paper-icon icon="volume-up" class="playerControllIcon volumeButton"}}
{{range-slider start=volume min=0 max=100 change="volumeSliderChanged"}}
<span id="playerTimeControls">{{timeElapsed}} / {{timeRemaining}}</span> <span id="playerTimeControls">{{timeElapsed}} / {{timeRemaining}}</span>

View file

@ -13,6 +13,7 @@
"hammerjs": "~2.0.4", "hammerjs": "~2.0.4",
"jquery": "^1.11.1", "jquery": "^1.11.1",
"loader.js": "ember-cli/loader.js#3.2.0", "loader.js": "ember-cli/loader.js#3.2.0",
"qunit": "~1.18.0" "qunit": "~1.18.0",
"nouislider": "^8.0.1"
} }
} }

View file

@ -29,6 +29,7 @@
"ember-cli-htmlbars-inline-precompile": "^0.1.1", "ember-cli-htmlbars-inline-precompile": "^0.1.1",
"ember-cli-ic-ajax": "0.2.1", "ember-cli-ic-ajax": "0.2.1",
"ember-cli-inject-live-reload": "^1.3.0", "ember-cli-inject-live-reload": "^1.3.0",
"ember-cli-nouislider": "0.7.0",
"ember-cli-qunit": "0.3.20", "ember-cli-qunit": "0.3.20",
"ember-cli-release": "0.2.3", "ember-cli-release": "0.2.3",
"ember-cli-sass": "4.0.1", "ember-cli-sass": "4.0.1",