cms/app-client/app/services/player.js
changeset 254 a7cf2887e993
parent 253 0be9770b09b4
child 271 e234339fe8df
equal deleted inserted replaced
253:0be9770b09b4 254:a7cf2887e993
     8     transcript: null,
     8     transcript: null,
     9 
     9 
    10     window: '',
    10     window: '',
    11     playing: false,
    11     playing: false,
    12     progress: 0, // In Milliseconds
    12     progress: 0, // In Milliseconds
    13     reduce: false,
    13     videoscreen: false,
    14 
    14 
    15     display: function(el) {
    15     modelObserver: Ember.observer('model', function() {
       
    16         this.toggleVideoscreen(this.get('model').get('video'));
       
    17     }),
       
    18 
       
    19     displayAdditionalInformation: function(el) {
       
    20         if(el === 'video') {
       
    21             this.toggleVideoscreen();
       
    22         } else {
       
    23             this.displayMetadata(el);
       
    24         }
       
    25     },
       
    26 
       
    27     displayMetadata: function(el) {
    16          if(this.get('window') !== el) {
    28          if(this.get('window') !== el) {
    17             this.set('window', el);
    29             this.set('window', el);
    18         } else {
    30         } else {
    19             this.set('window', '');
    31             this.set('window', '');
    20         }
    32         }
       
    33     },
       
    34 
       
    35     toggleVideoscreen: function(state) {
       
    36         if(typeof state === 'undefined') {
       
    37             this.set('videoscreen', !this.get('videoscreen'));
       
    38         } else {
       
    39             this.set('videoscreen', state);
       
    40         }        
    21     },
    41     },
    22 
    42 
    23     init: function() {
    43     init: function() {
    24         this.on('reset', Ember.run.bind(this, this.get('reset')));
    44         this.on('reset', Ember.run.bind(this, this.get('reset')));
    25     },
    45     },