trying out the dimmer

This commit is contained in:
Egor Philippov 2015-10-06 17:49:59 -07:00
parent 49f324295f
commit 3e0fcef76c
4 changed files with 33 additions and 17 deletions

View file

@ -98,6 +98,8 @@ export default Em.Component.extend(musicControlMixin, visualizerMixin, {
if(!replayPause){ if(!replayPause){
this.set('timeElapsed', Math.floor(dancer.getTime())); this.set('timeElapsed', Math.floor(dancer.getTime()));
} }
this.set('dimmerOn', false);
} else { } else {
if(this.get('volumeMuted')) { if(this.get('volumeMuted')) {
dancer.setVolume(0); dancer.setVolume(0);
@ -111,7 +113,10 @@ export default Em.Component.extend(musicControlMixin, visualizerMixin, {
} }
dancer.play(); dancer.play();
this.set('incrementElapseTimeHandle', window.setInterval(this.incrementElapseTime.bind(this), 1000)); this.setProperties({
dimmerOn: true,
incrementElapseTimeHandle: window.setInterval(this.incrementElapseTime.bind(this), 1000)
});
} }
this.toggleProperty('playing'); this.toggleProperty('playing');
} }

View file

@ -89,6 +89,7 @@ export default Em.Mixin.create({
dragLeaveTimeoutHandle: null, dragLeaveTimeoutHandle: null,
visualizationsDisplayed: false, visualizationsDisplayed: false,
audioStream: null, audioStream: null,
dimmerOn: false,
notFoundHtml: '<div class="alert alert-danger" role="alert">A microphone was not found.</div>', notFoundHtml: '<div class="alert alert-danger" role="alert">A microphone was not found.</div>',
@ -202,8 +203,12 @@ export default Em.Mixin.create({
classes += ' draggingOver'; classes += ' draggingOver';
} }
if(this.get('dimmerOn')){
classes += ' dimmerFriendly';
}
return classes; return classes;
}.property('dragging', 'draggingOverPlayListArea'), }.property('dragging', 'draggingOverPlayListArea', 'dimmerOn'),
usingLocalAudioClass: function() { usingLocalAudioClass: function() {
return this.get('usingLocalAudio') ? 'playerControllIcon active' : 'playerControllIcon'; return this.get('usingLocalAudio') ? 'playerControllIcon active' : 'playerControllIcon';

View file

@ -1,4 +1,4 @@
<div class="row"> <div class="row antiDimmer">
<div id="playerArea" class="col-sm-8 col-xs-12" {{action "playerAreaPlay"}}> <div id="playerArea" class="col-sm-8 col-xs-12" {{action "playerAreaPlay"}}>
<div id="playNotification" <div id="playNotification"
class="material-icons {{if fadeOutNotification "fadeOut"}} {{if playing "play-arrow" "pause"}}"></div> class="material-icons {{if fadeOutNotification "fadeOut"}} {{if playing "play-arrow" "pause"}}"></div>
@ -93,14 +93,14 @@
</div> </div>
</div> </div>
<div id="slideToggle" class="text-center cursorPointer row" {{action "slideTogglePlayerBottom"}}> <div id="slideToggle" class="text-center cursorPointer row antiDimmer" {{action "slideTogglePlayerBottom"}}>
<div class="col-xs-offset-5 col-xs-2"> <div class="col-xs-offset-5 col-xs-2">
{{paper-icon icon=beatDetectionArrowIcon}} {{paper-icon icon=beatDetectionArrowIcon}}
</div> </div>
</div> </div>
{{#if playerBottomDisplayed}} {{#if playerBottomDisplayed}}
<div id="playerBottom" class="row"> <div id="playerBottom" class="row antiDimmer {{if dimmerOn "dimmerFriendly"}}">
<div id="beatArea" class="col-lg-8 col-xs-12"> <div id="beatArea" class="col-lg-8 col-xs-12">
<div class="row"> <div class="row">
<div class="beatOption col-xs-3"> <div class="beatOption col-xs-3">
@ -193,4 +193,4 @@
{{/if}} {{/if}}
{{ember-notify closeAfter=5000}} {{ember-notify closeAfter=5000}}
<!--<div id="dimmer" class="{{if playing "show"}}"></div>--> <div id="dimmer" class="{{if dimmerOn "show"}}"></div>

View file

@ -82,6 +82,7 @@ md-switch[disabled=disabled], md-switch[disabled=disabled] .md-container, md-sli
bottom: 0; bottom: 0;
width: 100%; width: 100%;
height: $footerHeight; height: $footerHeight;
z-index: -1;
p { p {
padding-left: 0; padding-left: 0;
margin-top: 10px; margin-top: 10px;
@ -139,7 +140,6 @@ md-progress-linear {
position: absolute; position: absolute;
background: white; background: white;
box-shadow: 5px 10px 15px 5px rgba(0, 0, 0, .3); box-shadow: 5px 10px 15px 5px rgba(0, 0, 0, .3);
z-index: 2;
width: 200px; width: 200px;
right: 0; right: 0;
} }
@ -193,7 +193,6 @@ md-list-item .md-no-style {
background: rgba(0, 0, 0, 0.7); background: rgba(0, 0, 0, 0.7);
box-shadow: 5px 10px 15px 5px rgba(0, 0, 0, 0.3); box-shadow: 5px 10px 15px 5px rgba(0, 0, 0, 0.3);
color: #FFFFFF; color: #FFFFFF;
z-index: 2;
position: absolute; position: absolute;
width: 275px; width: 275px;
height: 275px; height: 275px;
@ -234,7 +233,6 @@ md-slider.md-default-theme .md-thumb:after {
top: 20px; top: 20px;
right: 0; right: 0;
position: absolute; position: absolute;
z-index: 2;
background-color: white; background-color: white;
max-height: 400px; max-height: 400px;
overflow: auto; overflow: auto;
@ -403,7 +401,6 @@ md-toolbar {
#slideToggle { #slideToggle {
color: $playerDefaultIconColor; color: $playerDefaultIconColor;
background: #8C3E3E; background: #8C3E3E;
z-index: 2;
div md-icon { div md-icon {
color: inherit !important; color: inherit !important;
} }
@ -499,7 +496,6 @@ md-switch.md-default-theme.md-checked .md-thumb {
background-color: black; background-color: black;
display: inline-block; display: inline-block;
padding: 0; padding: 0;
z-index: 2;
} }
#playerArea:hover #playerControls { #playerArea:hover #playerControls {
@ -510,7 +506,6 @@ md-switch.md-default-theme.md-checked .md-thumb {
height: $playerHeight; height: $playerHeight;
background-color: #1E1E1E; background-color: #1E1E1E;
padding: 0 5px 0 5px; padding: 0 5px 0 5px;
z-index: 2;
} }
#playerArea * .noUi-origin { #playerArea * .noUi-origin {
@ -674,7 +669,6 @@ md-switch.md-default-theme.md-checked .md-thumb {
} }
#beatArea { #beatArea {
z-index: 2;
position: relative; position: relative;
padding-top: 20px; padding-top: 20px;
} }
@ -712,13 +706,12 @@ md-switch.md-default-theme.md-checked .md-thumb {
color: black; color: black;
border: 1px solid black; border: 1px solid black;
width: 100%; width: 100%;
z-index: 2; background: white;
} }
#beatContainer { #beatContainer {
vertical-align: middle; vertical-align: middle;
padding: 0 10px; padding: 0 10px;
z-index: 2;
md-switch { md-switch {
bottom: 0; bottom: 0;
position: absolute; position: absolute;
@ -943,8 +936,18 @@ $vibrateblur1:1px;
display: none; display: none;
} }
.noUi-value-vertical { .antiDimmer {
color: black; position: relative;
z-index: 2;
}
.dimmerFriendly {
color: white !important;
background: #171717 !important;
}
.noUi-value-vertical, .noUi-pips {
color: inherit !important;
} }
.noUi-vertical .noUi-handle { .noUi-vertical .noUi-handle {
@ -955,3 +958,6 @@ $vibrateblur1:1px;
.noUi-vertical .noUi-handle:after, .noUi-vertical .noUi-handle:before{ .noUi-vertical .noUi-handle:after, .noUi-vertical .noUi-handle:before{
background: grey; background: grey;
} }