equal
deleted
inserted
replaced
2 |
2 |
3 export default Ember.Component.extend({ |
3 export default Ember.Component.extend({ |
4 classNames: ['player-component'], |
4 classNames: ['player-component'], |
5 |
5 |
6 player: Ember.inject.service(), |
6 player: Ember.inject.service(), |
7 playing: false, |
|
8 popcorn: null, |
7 popcorn: null, |
9 |
8 |
10 head: 0, |
9 head: 0, |
11 remaining: 0, |
10 remaining: 0, |
12 |
11 |
43 }, |
42 }, |
44 |
43 |
45 actions: { |
44 actions: { |
46 |
45 |
47 play: function() { |
46 play: function() { |
48 if(this.get('playing')) { |
47 if(this.get('player').get('playing')) { |
49 this.get('popcorn').pause(); |
48 this.get('popcorn').pause(); |
50 } else { |
49 } else { |
51 this.get('popcorn').play(); |
50 this.get('popcorn').play(); |
52 } |
51 } |
53 this.set('playing', !this.get('playing')); |
52 this.get('player').set('playing', !this.get('player').get('playing')); |
54 }, |
53 }, |
55 |
54 |
56 backward: function() { |
55 backward: function() { |
57 console.log('backward'); |
56 console.log('backward'); |
58 }, |
57 }, |