Bug 1175006 - Reset state so we re-try creating a trial GMPVideoDecoder whenever Firefox updates. r=spohl

This commit is contained in:
Chris Pearce 2015-06-17 11:00:42 +12:00
Родитель 0c2873b860
Коммит 31c698a9fa
1 изменённых файлов: 9 добавлений и 0 удалений

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

@ -376,6 +376,15 @@ GMPInstallManager.prototype = {
log.info("A version change occurred. Ignoring " +
"media.gmp-manager.lastCheck to check immediately for " +
"new or updated GMPs.");
// Firefox updated; it could be that the TrialGMPVideoDecoderCreator
// had failed but could now succeed, or vice versa. So reset the
// prefs so we re-try next time EME is used.
GMP_PLUGIN_IDS.concat("gmp-eme-clearkey").forEach(
function(id, index, array) {
log.info("Version change, resetting " +
GMPPrefs.getPrefKey(GMPPrefs.KEY_PLUGIN_TRIAL_CREATE, id));
GMPPrefs.reset(GMPPrefs.KEY_PLUGIN_TRIAL_CREATE, id);
});
} else {
let secondsBetweenChecks =
GMPPrefs.get(GMPPrefs.KEY_SECONDS_BETWEEN_CHECKS,