spira-bin-2.0
{
"version": "0.7.2",
"EmberENV": {
"FEATURES": {}
},
"options": {
"use_pods": false,
"enable-testing": false
},
"dependencies": {
"jquery": "https://cdnjs.cloudflare.com/ajax/libs/jquery/1.11.3/jquery.js",
"ember": "https://cdnjs.cloudflare.com/ajax/libs/ember.js/2.4.4/ember.debug.js",
"ember-data": "https://cdnjs.cloudflare.com/ajax/libs/ember-data.js/2.4.3/ember-data.js",
"ember-template-compiler": "https://cdnjs.cloudflare.com/ajax/libs/ember.js/2.4.4/ember-template-compiler.js"
}
}
fadeTime: {{fadeTime}}<br>
numberOfSoundsInBin: {{numberOfSoundsInBin}}<br>
soundsInBin:
{{#each soundsInBin as |sound|}}
{{sound}}
{{/each}}<br>
showMindiumPlayBar:{{#if showMindiumPlayBar}}
true{{else}}false{{/if}}<br>
canAddSoundsToBin: {{#if canAddSoundsToBin}}true{{else}}false{{/if}}<br>
globalVolume: {{globalVolume}}<br>
isPlaying: {{#if isPlaying}}true{{else}}false{{/if}}<br>
singleVolume: {{singleVolume}}
<br>
<button {{action 'togglePlay'}}>
{{#if isPlaying}}
Pause all
{{else}}
Play all
{{/if}}
</button>
<h1>Welcome to {{appName}}</h1>
<br>
<br>
{{outlet}}
{{spira-bin}}
<br>
<br>
import Ember from 'ember';
export default Ember.Controller.extend({
appName: 'Ember Twiddlse'
});
import Ember from 'ember';
export default Ember.Component.extend({
fadeTime: 1000,
soundsInBin: ['sound1.mp3','sound2.mp3','sound3.mp3','sound4.mp3'],
numberOfSoundsInBin: Ember.computed('soundsInBin.length', function() {
return this.get('soundsInBin.length');
}),
showMindiumPlayBar: Ember.computed.gte('numberOfSoundsInBin', 1),
canAddSoundsToBin: Ember.computed.lte('numberOfSoundsInBin', 4),
globalVolume: 75,
singleVolume: 25,
isPlaying: false,
actions: {
togglePlay() {
this.set('isPlaying', !this.get('isPlaying'));
}
}
});