1
0
mirror of https://github.com/videojs/video.js.git synced 2025-01-04 06:48:49 +02:00

Fixed issue where ManualTimeUpdatesOff was not de-registering events. closes #1793

This commit is contained in:
Gary Katsevman 2015-01-16 12:05:21 -08:00 committed by Matthew McClure
parent a8d1ef114a
commit 1c17a67f39
4 changed files with 7 additions and 2 deletions

View File

@ -9,6 +9,7 @@ CHANGELOG
* @Sxmanek added a Czech translation ([view](https://github.com/videojs/video.js/pull/1739))
* @jcaron23 added the vjs-scrubbing CSS class and prevented menus from showing while scrubbing ([view](https://github.com/videojs/video.js/pull/1741))
* @dmlap fixed URL parsing in IE9 ([view](https://github.com/videojs/video.js/pull/1765))
* Fixed issue where ManualTimeUpdatesOff was not de-registering events ([view](https://github.com/videojs/video.js/pull/1793))
--------------------

View File

@ -215,10 +215,12 @@ vjs.MediaTechController.prototype.manualTimeUpdatesOn = function(){
};
vjs.MediaTechController.prototype.manualTimeUpdatesOff = function(){
var player = this.player_;
this.manualTimeUpdates = false;
this.stopTrackingCurrentTime();
this.off('play', this.trackCurrentTime);
this.off('pause', this.stopTrackingCurrentTime);
this.off(player, 'play', this.trackCurrentTime);
this.off(player, 'pause', this.stopTrackingCurrentTime);
};
vjs.MediaTechController.prototype.trackCurrentTime = function(){

View File

@ -105,6 +105,7 @@ test('dispose removes the object element even before ready fires', function() {
tech = new vjs.Flash({
id: noop,
on: noop,
off: noop,
trigger: noop,
options_: {}
}, {

View File

@ -39,6 +39,7 @@ test('stops timeupdates if the tech produces them natively', function() {
var timeupdates = 0, tech, playHandler, expected;
tech = new videojs.MediaTechController({
id: this.noop,
off: this.noop,
on: function(event, handler) {
if (event === 'play') {
playHandler = handler;