equal
deleted
inserted
replaced
46 this.toggle(); |
46 this.toggle(); |
47 } |
47 } |
48 })); |
48 })); |
49 }, |
49 }, |
50 |
50 |
51 onUpdate: function(event) { |
51 onUpdate: function() { |
52 var currentTime = this.get('popcorn').currentTime(); |
52 var currentTime = this.get('popcorn').currentTime(); |
53 var duration = this.get('popcorn').duration(); |
53 var duration = this.get('popcorn').duration(); |
54 this.$('.bar .value').width(currentTime * 100 / duration + '%'); |
54 this.$('.bar .value').width(currentTime * 100 / duration + '%'); |
55 this.set('head', currentTime); |
55 this.set('head', currentTime); |
56 this.set('remaining', duration - currentTime); |
56 this.set('remaining', duration - currentTime); |
57 }, |
57 }, |
58 |
58 |
59 onPlay: function(event) { |
59 onPlay: function() { |
60 this.get('player').set('playing', true); |
60 this.get('player').set('playing', true); |
61 }, |
61 }, |
62 |
62 |
63 onPause: function(event) { |
63 onPause: function() { |
64 this.get('player').set('playing', false); |
64 this.get('player').set('playing', false); |
65 }, |
65 }, |
66 |
66 |
67 play: function() { |
67 play: function() { |
68 this.get('popcorn').play(); |
68 this.get('popcorn').play(); |