Bug 989047 - increase canplaythrough timeouts to accomodate B2G slowness. r=jesup

This commit is contained in:
Nils Ohlmeier [:drno] 2014-04-03 18:11:00 +02:00
Родитель ac865b81d1
Коммит 88f4fc7a77
1 изменённых файлов: 10 добавлений и 4 удалений

Просмотреть файл

@ -2,7 +2,13 @@
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
var TIMEOUT_LENGTH = 10000;
const TIMEUPDATE_TIMEOUT_LENGTH = 10000;
const ENDED_TIMEOUT_LENGTH = 10000;
/* Time we wait for the canplaythrough event to fire
* Note: this needs to be at least 30s because the
* B2G emulator in VMs is really slow. */
const CANPLAYTHROUGH_TIMEOUT_LENGTH = 60000;
/**
* This class manages playback of a HTMLMediaElement with a MediaStream.
@ -123,7 +129,7 @@ MediaStreamPlayback.prototype = {
timeUpdateCallback, false);
onError("timeUpdate event never fired");
}
}, TIMEOUT_LENGTH);
}, TIMEUPDATE_TIMEOUT_LENGTH);
};
// Adds a listener intended to be fired when playback is available
@ -142,7 +148,7 @@ MediaStreamPlayback.prototype = {
canPlayThroughCallback, false);
onError("canplaythrough event never fired");
}
}, TIMEOUT_LENGTH);
}, CANPLAYTHROUGH_TIMEOUT_LENGTH);
},
/**
@ -237,7 +243,7 @@ LocalMediaStreamPlayback.prototype = Object.create(MediaStreamPlayback.prototype
if (!endedFired) {
onError("ended event never fired");
}
}, TIMEOUT_LENGTH);
}, ENDED_TIMEOUT_LENGTH);
}
}
});