cms/app-client/app/components/transcript-turn-component.js
changeset 455 a8bed1c7df8e
parent 454 710a2ae08a74
child 457 a7a333c0b1eb
--- a/cms/app-client/app/components/transcript-turn-component.js	Fri Dec 02 00:22:31 2016 +0100
+++ b/cms/app-client/app/components/transcript-turn-component.js	Fri Dec 02 03:30:51 2016 +0100
@@ -4,15 +4,22 @@
   tagName: 'li',
 
   classNames: ['sentence'],
-  classNameBindings: ['isPlaying:active'],
+  // classNameBindings: ['isPlaying:active'],
 
   begin: Ember.computed.readOnly('turn.begin'),
   end: Ember.computed.readOnly('turn.end'),
   title: Ember.computed.readOnly('turn.title'),
   annotations: Ember.computed.readOnly('turn.annotations'),
 
-  isPlaying: Ember.computed("player.progress", "begin", "end", function() {
-    var progress = this.get('player.progress');
-    return progress && progress >= this.get('begin') && progress < this.get('end');
-  })
+  // isPlaying: Ember.computed("player.progress", "begin", "end", function() {
+  //   var progress = this.get('player.progress');
+  //   return progress && progress >= this.get('begin') && progress < this.get('end');
+  // }),
+
+  didInsertElement: function() {
+    if(this.get('intervals')) {
+      this.get('intervals').add(this.get('begin'), this.get('end'), this.get('elementId'), this.$());
+    }
+  },
+
 });