cms/app-client/app/components/transcript-turn-component.js
changeset 455 a8bed1c7df8e
parent 454 710a2ae08a74
child 457 a7a333c0b1eb
equal deleted inserted replaced
454:710a2ae08a74 455:a8bed1c7df8e
     2 
     2 
     3 export default Ember.Component.extend({
     3 export default Ember.Component.extend({
     4   tagName: 'li',
     4   tagName: 'li',
     5 
     5 
     6   classNames: ['sentence'],
     6   classNames: ['sentence'],
     7   classNameBindings: ['isPlaying:active'],
     7   // classNameBindings: ['isPlaying:active'],
     8 
     8 
     9   begin: Ember.computed.readOnly('turn.begin'),
     9   begin: Ember.computed.readOnly('turn.begin'),
    10   end: Ember.computed.readOnly('turn.end'),
    10   end: Ember.computed.readOnly('turn.end'),
    11   title: Ember.computed.readOnly('turn.title'),
    11   title: Ember.computed.readOnly('turn.title'),
    12   annotations: Ember.computed.readOnly('turn.annotations'),
    12   annotations: Ember.computed.readOnly('turn.annotations'),
    13 
    13 
    14   isPlaying: Ember.computed("player.progress", "begin", "end", function() {
    14   // isPlaying: Ember.computed("player.progress", "begin", "end", function() {
    15     var progress = this.get('player.progress');
    15   //   var progress = this.get('player.progress');
    16     return progress && progress >= this.get('begin') && progress < this.get('end');
    16   //   return progress && progress >= this.get('begin') && progress < this.get('end');
    17   })
    17   // }),
       
    18 
       
    19   didInsertElement: function() {
       
    20     if(this.get('intervals')) {
       
    21       this.get('intervals').add(this.get('begin'), this.get('end'), this.get('elementId'), this.$());
       
    22     }
       
    23   },
       
    24 
    18 });
    25 });