src/js/widgets/playerWidget.js
branchpopcorn-port
changeset 338 3ff4499f79bb
parent 331 ef3447aa6920
child 355 d8df77c40676
equal deleted inserted replaced
337:ee1d1e4fcf45 338:3ff4499f79bb
    59   // we get it at each call because it may change.
    59   // we get it at each call because it may change.
    60   var duration = +this._serializer.currentMedia().meta["dc:duration"] / 1000; 
    60   var duration = +this._serializer.currentMedia().meta["dc:duration"] / 1000; 
    61   var totalTime = IriSP.secondsToTime(duration);
    61   var totalTime = IriSP.secondsToTime(duration);
    62   var elapsedTime = IriSP.secondsToTime(this._Popcorn.currentTime());
    62   var elapsedTime = IriSP.secondsToTime(this._Popcorn.currentTime());
    63   
    63   
    64   var timeTemplate = "{{hours}}:{{minutes}}:{{seconds}}";
    64   this.selector.find(".Ldt-ElapsedTime").html(elapsedTime.toString());
    65   this.selector.find(".Ldt-ElapsedTime").html(Mustache.to_html(timeTemplate, elapsedTime));
    65   this.selector.find(".Ldt-TotalTime").html(totalTime.toString());
    66   this.selector.find(".Ldt-TotalTime").html(Mustache.to_html(timeTemplate, totalTime));
       
    67   this._previousSecond = this._Popcorn.roundTime();
    66   this._previousSecond = this._Popcorn.roundTime();
    68 };
    67 };
    69 
    68 
    70 /* update the icon of the button - separate function from playHandler
    69 /* update the icon of the button - separate function from playHandler
    71    because in some cases (for instance, when the user directly clicks on
    70    because in some cases (for instance, when the user directly clicks on