equal
deleted
inserted
replaced
8 popcorn: null, |
8 popcorn: null, |
9 |
9 |
10 head: 0, |
10 head: 0, |
11 remaining: 0, |
11 remaining: 0, |
12 |
12 |
13 item: Ember.computed('player.item', function() { |
13 isFirst: false, |
14 return this.get('player').get('item'); |
14 isLast: false, |
|
15 |
|
16 item: Ember.computed('player.model', function() { |
|
17 return this.get('player').get('model'); |
15 }), |
18 }), |
16 |
19 |
17 documentLoaded: Ember.observer('player.item', function() { |
20 modelLoaded: Ember.observer('player.model', function() { |
|
21 var items = this.get('player').get('items'); |
|
22 var index = items.indexOf(this.get('player').get('item')); |
|
23 this.set('isFirst', index === 0); |
|
24 this.set('isLast', index === items.length - 1); |
18 }), |
25 }), |
19 |
26 |
20 init: function() { |
27 init: function() { |
21 this._super(...arguments); |
28 this._super(...arguments); |
22 this.get('player'); |
29 this.get('player'); |
42 this.get('popcorn').pause(); |
49 this.get('popcorn').pause(); |
43 } else { |
50 } else { |
44 this.get('popcorn').play(); |
51 this.get('popcorn').play(); |
45 } |
52 } |
46 this.set('playing', !this.get('playing')); |
53 this.set('playing', !this.get('playing')); |
|
54 }, |
|
55 |
|
56 backward: function() { |
|
57 console.log('backward'); |
|
58 }, |
|
59 |
|
60 forward: function() { |
|
61 console.log('forward'); |
47 } |
62 } |
48 |
63 |
49 } |
64 } |
50 }); |
65 }); |