cms/app-client/app/components/transcript-turn-component.js
author ymh <ymh.work@gmail.com>
Fri, 02 Dec 2016 09:33:53 +0100
changeset 456 3a32d2f57429
parent 455 a8bed1c7df8e
child 457 a7a333c0b1eb
permissions -rw-r--r--
ember 2.10

import Ember from 'ember';

export default Ember.Component.extend({
  tagName: 'li',

  classNames: ['sentence'],
  // 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');
  // }),

  didInsertElement: function() {
    if(this.get('intervals')) {
      this.get('intervals').add(this.get('begin'), this.get('end'), this.get('elementId'), this.$());
    }
  },

});