src/widgets/Controller.js
branchplayers-as-widgets
changeset 960 9a278b9e3b05
parent 957 4da0a5740b6c
child 970 b1c3bf6eca78
equal deleted inserted replaced
959:ee11ed1b739e 960:9a278b9e3b05
   154         }, 
   154         }, 
   155         function() {
   155         function() {
   156             _this.player.trigger("Player.MouseOut");
   156             _this.player.trigger("Player.MouseOut");
   157         });
   157         });
   158     
   158     
   159     this.timeDisplayUpdater(0);
   159     this.timeDisplayUpdater(new IriSP.Model.Time(0));
   160     /* some players - including jwplayer - save the state of the mute button between sessions */
   160     /* some players - including jwplayer - save the state of the mute button between sessions */
   161    //TODO: MOVE TO THE PLAYER/
   161    //TODO: MOVE TO THE PLAYER/
   162     window.setTimeout(this.functionWrapper("volumeUpdater"), 1000);
   162     window.setTimeout(this.functionWrapper("volumeUpdater"), 1000);
   163    
   163    
   164 };
   164 };
   166 /* Update the elasped time div */
   166 /* Update the elasped time div */
   167 IriSP.Widgets.Controller.prototype.timeDisplayUpdater = function(_time) {
   167 IriSP.Widgets.Controller.prototype.timeDisplayUpdater = function(_time) {
   168   
   168   
   169     // we get it at each call because it may change.
   169     // we get it at each call because it may change.
   170     var _totalTime = this.media.duration;
   170     var _totalTime = this.media.duration;
   171         
       
   172     this.$.find(".Ldt-Ctrl-Time-Elapsed").html(_time.toString());
   171     this.$.find(".Ldt-Ctrl-Time-Elapsed").html(_time.toString());
   173     this.$.find(".Ldt-Ctrl-Time-Total").html(_totalTime.toString());
   172     this.$.find(".Ldt-Ctrl-Time-Total").html(_totalTime.toString());
   174 };
   173 };
   175 
   174 
   176 /* update the icon of the button - separate function from playHandler
   175 /* update the icon of the button - separate function from playHandler