1 import Ember from 'ember'; |
1 import Ember from 'ember'; |
2 |
2 |
3 export default Ember.Component.extend({ |
3 export default Ember.Component.extend({ |
4 |
4 |
5 classNameBindings: ['isPlaying:active'], |
5 // classNameBindings: ['isPlaying:active'], |
6 |
6 |
7 hasPlayer: Ember.computed.bool('player'), |
7 hasPlayer: Ember.computed.bool('player'), |
8 |
8 |
9 begin: Ember.computed.readOnly('annotation.begin'), |
9 begin: Ember.computed.readOnly('annotation.begin'), |
10 end: Ember.computed.readOnly('annotation.end'), |
10 end: Ember.computed.readOnly('annotation.end'), |
13 speaker: Ember.computed.readOnly('annotation.speaker'), |
13 speaker: Ember.computed.readOnly('annotation.speaker'), |
14 showSpeaker: Ember.computed.readOnly('annotation.showSpeaker'), |
14 showSpeaker: Ember.computed.readOnly('annotation.showSpeaker'), |
15 literal: Ember.computed.readOnly('annotation.literal'), |
15 literal: Ember.computed.readOnly('annotation.literal'), |
16 translation: Ember.computed.readOnly('annotation.translation'), |
16 translation: Ember.computed.readOnly('annotation.translation'), |
17 |
17 |
18 isPlaying: Ember.computed("hasPlayer","player.progress", "begin", "end", function() { |
18 // isPlaying: Ember.computed("hasPlayer","player.progress", "begin", "end", function() { |
19 var progress = this.get('player.progress'); |
19 // var progress = this.get('player.progress'); |
20 return this.get('hasPlayer') && progress && (progress >= this.get('begin')) && (progress < this.get('end')); |
20 // return this.get('hasPlayer') && progress && (progress >= this.get('begin')) && (progress < this.get('end')); |
21 }) |
21 // }), |
|
22 |
|
23 didInsertElement: function() { |
|
24 if(this.get('hasPlayer') && this.get('intervals')) { |
|
25 this.get('intervals').add(this.get('begin'), this.get('end'), this.get('elementId'), this.$()); |
|
26 } |
|
27 }, |
|
28 |
22 |
29 |
23 }); |
30 }); |