configure(config, value) {
    goog.asserts.assert(this.config_, 'Config must not be null!');
    goog.asserts.assert(typeof(config) == 'object' || arguments.length == 2,
        'String configs should have values!');

    // ('fieldName', value) format
    if (arguments.length == 2 && typeof(config) == 'string') {
      config = shaka.util.ConfigUtils.convertToConfigObject(config, value);
    }

    goog.asserts.assert(typeof(config) == 'object', 'Should be an object!');

    // Deprecate 'streaming.forceTransmuxTS' configuration.
    if (config['streaming'] && 'forceTransmuxTS' in config['streaming']) {
      shaka.Deprecate.deprecateFeature(5,
          'streaming.forceTransmuxTS configuration',
          'Please Use mediaSource.forceTransmux instead.');
      config['mediaSource'] = config['mediaSource'] || {};
      config['mediaSource']['mediaSource'] =
          config['streaming']['forceTransmuxTS'];
      delete config['streaming']['forceTransmuxTS'];
    }

    // Deprecate 'streaming.forceTransmux' configuration.
    if (config['streaming'] && 'forceTransmux' in config['streaming']) {
      shaka.Deprecate.deprecateFeature(5,
          'streaming.forceTransmux configuration',
          'Please Use mediaSource.forceTransmux instead.');
      config['mediaSource'] = config['mediaSource'] || {};
      config['mediaSource']['mediaSource'] =
          config['streaming']['forceTransmux'];
      delete config['streaming']['forceTransmux'];
    }

    // Deprecate 'streaming.useNativeHlsOnSafari' configuration.
    if (config['streaming'] && 'useNativeHlsOnSafari' in config['streaming']) {
      shaka.Deprecate.deprecateFeature(5,
          'streaming.useNativeHlsOnSafari configuration',
          'Please Use streaming.useNativeHlsForFairPlay or ' +
          'streaming.preferNativeHls instead.');
      const device = shaka.device.DeviceFactory.getDevice();
      config['streaming']['preferNativeHls'] =
          config['streaming']['useNativeHlsOnSafari'] &&
          device.getBrowserEngine() ===
          shaka.device.IDevice.BrowserEngine.WEBKIT;
      delete config['streaming']['useNativeHlsOnSafari'];
    }

    // Deprecate 'streaming.liveSync' boolean configuration.
    if (config['streaming'] &&
        typeof config['streaming']['liveSync'] == 'boolean') {
      shaka.Deprecate.deprecateFeature(5,
          'streaming.liveSync',
          'Please Use streaming.liveSync.enabled instead.');
      const liveSyncValue = config['streaming']['liveSync'];
      config['streaming']['liveSync'] = {};
      config['streaming']['liveSync']['enabled'] = liveSyncValue;
    }

    // map liveSyncMinLatency and liveSyncMaxLatency to liveSync.targetLatency
    // if liveSync.targetLatency isn't set.
    if (config['streaming'] && (!config['streaming']['liveSync'] ||
      !('targetLatency' in config['streaming']['liveSync'])) &&
      ('liveSyncMinLatency' in config['streaming'] ||
       'liveSyncMaxLatency' in config['streaming'])) {
      const min = config['streaming']['liveSyncMinLatency'] || 0;
      const max = config['streaming']['liveSyncMaxLatency'] || 1;
      const mid = Math.abs(max - min) / 2;
      config['streaming']['liveSync'] = config['streaming']['liveSync'] || {};
      config['streaming']['liveSync']['targetLatency'] = min + mid;
      config['streaming']['liveSync']['targetLatencyTolerance'] = mid;
    }
    // Deprecate 'streaming.liveSyncMaxLatency' configuration.
    if (config['streaming'] && 'liveSyncMaxLatency' in config['streaming']) {
      shaka.Deprecate.deprecateFeature(5,
          'streaming.liveSyncMaxLatency',
          'Please Use streaming.liveSync.targetLatency and ' +
          'streaming.liveSync.targetLatencyTolerance instead. ' +
          'Or, set the values in your DASH manifest');
      delete config['streaming']['liveSyncMaxLatency'];
    }
    // Deprecate 'streaming.liveSyncMinLatency' configuration.
    if (config['streaming'] && 'liveSyncMinLatency' in config['streaming']) {
      shaka.Deprecate.deprecateFeature(5,
          'streaming.liveSyncMinLatency',
          'Please Use streaming.liveSync.targetLatency and ' +
          'streaming.liveSync.targetLatencyTolerance instead. ' +
          'Or, set the values in your DASH manifest');
      delete config['streaming']['liveSyncMinLatency'];
    }

    // Deprecate 'streaming.liveSyncTargetLatency' configuration.
    if (config['streaming'] && 'liveSyncTargetLatency' in config['streaming']) {
      shaka.Deprecate.deprecateFeature(5,
          'streaming.liveSyncTargetLatency',
          'Please Use streaming.liveSync.targetLatency instead.');
      config['streaming']['liveSync'] = config['streaming']['liveSync'] || {};
      config['streaming']['liveSync']['targetLatency'] =
          config['streaming']['liveSyncTargetLatency'];
      delete config['streaming']['liveSyncTargetLatency'];
    }

    // Deprecate 'streaming.liveSyncTargetLatencyTolerance' configuration.
    if (config['streaming'] &&
      'liveSyncTargetLatencyTolerance' in config['streaming']) {
      shaka.Deprecate.deprecateFeature(5,
          'streaming.liveSyncTargetLatencyTolerance',
          'Please Use streaming.liveSync.targetLatencyTolerance instead.');
      config['streaming']['liveSync'] = config['streaming']['liveSync'] || {};
      config['streaming']['liveSync']['targetLatencyTolerance'] =
          config['streaming']['liveSyncTargetLatencyTolerance'];
      delete config['streaming']['liveSyncTargetLatencyTolerance'];
    }

    // Deprecate 'streaming.liveSyncPlaybackRate' configuration.
    if (config['streaming'] && 'liveSyncPlaybackRate' in config['streaming']) {
      shaka.Deprecate.deprecateFeature(5,
          'streaming.liveSyncPlaybackRate',
          'Please Use streaming.liveSync.maxPlaybackRate instead.');
      config['streaming']['liveSync'] = config['streaming']['liveSync'] || {};
      config['streaming']['liveSync']['maxPlaybackRate'] =
          config['streaming']['liveSyncPlaybackRate'];
      delete config['streaming']['liveSyncPlaybackRate'];
    }

    // Deprecate 'streaming.liveSyncMinPlaybackRate' configuration.
    if (config['streaming'] &&
      'liveSyncMinPlaybackRate' in config['streaming']) {
      shaka.Deprecate.deprecateFeature(5,
          'streaming.liveSyncMinPlaybackRate',
          'Please Use streaming.liveSync.minPlaybackRate instead.');
      config['streaming']['liveSync'] = config['streaming']['liveSync'] || {};
      config['streaming']['liveSync']['minPlaybackRate'] =
          config['streaming']['liveSyncMinPlaybackRate'];
      delete config['streaming']['liveSyncMinPlaybackRate'];
    }

    // Deprecate 'streaming.liveSyncPanicMode' configuration.
    if (config['streaming'] && 'liveSyncPanicMode' in config['streaming']) {
      shaka.Deprecate.deprecateFeature(5,
          'streaming.liveSyncPanicMode',
          'Please Use streaming.liveSync.panicMode instead.');
      config['streaming']['liveSync'] = config['streaming']['liveSync'] || {};
      config['streaming']['liveSync']['panicMode'] =
          config['streaming']['liveSyncPanicMode'];
      delete config['streaming']['liveSyncPanicMode'];
    }

    // Deprecate 'streaming.liveSyncPanicThreshold' configuration.
    if (config['streaming'] &&
      'liveSyncPanicThreshold' in config['streaming']) {
      shaka.Deprecate.deprecateFeature(5,
          'streaming.liveSyncPanicThreshold',
          'Please Use streaming.liveSync.panicThreshold instead.');
      config['streaming']['liveSync'] = config['streaming']['liveSync'] || {};
      config['streaming']['liveSync']['panicThreshold'] =
          config['streaming']['liveSyncPanicThreshold'];
      delete config['streaming']['liveSyncPanicThreshold'];
    }

    // Deprecate 'mediaSource.sourceBufferExtraFeatures' configuration.
    if (config['mediaSource'] &&
        'sourceBufferExtraFeatures' in config['mediaSource']) {
      shaka.Deprecate.deprecateFeature(5,
          'mediaSource.sourceBufferExtraFeatures configuration',
          'Please Use mediaSource.addExtraFeaturesToSourceBuffer() instead.');
      const sourceBufferExtraFeatures =
          config['mediaSource']['sourceBufferExtraFeatures'];
      config['mediaSource']['addExtraFeaturesToSourceBuffer'] = () => {
        return sourceBufferExtraFeatures;
      };
      delete config['mediaSource']['sourceBufferExtraFeatures'];
    }

    // Deprecate 'manifest.hls.useSafariBehaviorForLive' configuration.
    if (config['manifest'] && config['manifest']['hls'] &&
        'useSafariBehaviorForLive' in config['manifest']['hls']) {
      shaka.Deprecate.deprecateFeature(5,
          'manifest.hls.useSafariBehaviorForLive configuration',
          'Please Use liveSync config to keep on live Edge instead.');
      delete config['manifest']['hls']['useSafariBehaviorForLive'];
    }

    // Deprecate 'streaming.parsePrftBox' configuration.
    if (config['streaming'] && 'parsePrftBox' in config['streaming']) {
      shaka.Deprecate.deprecateFeature(5,
          'streaming.parsePrftBox configuration',
          'Now fired without needing a configuration.');
      delete config['streaming']['parsePrftBox'];
    }

    // Deprecate 'manifest.dash.enableAudioGroups' configuration.
    if (config['manifest'] && config['manifest']['dash'] &&
        'enableAudioGroups' in config['manifest']['dash']) {
      shaka.Deprecate.deprecateFeature(5,
          'manifest.dash.enableAudioGroups configuration',
          'It is now enabled by default and cannot be disabled.');
      delete config['manifest']['dash']['enableAudioGroups'];
    }

    // Deprecate 'streaming.dispatchAllEmsgBoxes' configuration.
    if (config['streaming'] && 'dispatchAllEmsgBoxes' in config['streaming']) {
      shaka.Deprecate.deprecateFeature(5,
          'streaming.dispatchAllEmsgBoxes configuration',
          'Please Use mediaSource.dispatchAllEmsgBoxes instead.');
      config['mediaSource'] = config['mediaSource'] || {};
      config['mediaSource']['dispatchAllEmsgBoxes'] =
          config['streaming']['dispatchAllEmsgBoxes'];
      delete config['streaming']['dispatchAllEmsgBoxes'];
    }

    // Deprecate 'streaming.autoLowLatencyMode' configuration.
    if (config['streaming'] && 'autoLowLatencyMode' in config['streaming']) {
      shaka.Deprecate.deprecateFeature(5,
          'streaming.autoLowLatencyMode configuration',
          'Please Use streaming.lowLatencyMode instead.');
      config['streaming']['lowLatencyMode'] =
          config['streaming']['autoLowLatencyMode'];
      delete config['streaming']['autoLowLatencyMode'];
    }

    // Deprecate 'manifest.dash.ignoreSupplementalCodecs' configuration.
    if (config['manifest'] && config['manifest']['dash'] &&
        'ignoreSupplementalCodecs' in config['manifest']['dash']) {
      shaka.Deprecate.deprecateFeature(5,
          'manifest.dash.ignoreSupplementalCodecs configuration',
          'Please Use manifest.ignoreSupplementalCodecs instead.');
      config['manifest']['ignoreSupplementalCodecs'] =
          config['manifest']['dash']['ignoreSupplementalCodecs'];
      delete config['manifest']['dash']['ignoreSupplementalCodecs'];
    }

    // Deprecate 'manifest.hls.ignoreSupplementalCodecs' configuration.
    if (config['manifest'] && config['manifest']['hls'] &&
        'ignoreSupplementalCodecs' in config['manifest']['hls']) {
      shaka.Deprecate.deprecateFeature(5,
          'manifest.hls.ignoreSupplementalCodecs configuration',
          'Please Use manifest.ignoreSupplementalCodecs instead.');
      config['manifest']['ignoreSupplementalCodecs'] =
          config['manifest']['hls']['ignoreSupplementalCodecs'];
      delete config['manifest']['hls']['ignoreSupplementalCodecs'];
    }

    // Deprecate 'manifest.dash.updatePeriod' configuration.
    if (config['manifest'] && config['manifest']['dash'] &&
        'updatePeriod' in config['manifest']['dash']) {
      shaka.Deprecate.deprecateFeature(5,
          'manifest.dash.updatePeriod configuration',
          'Please Use manifest.updatePeriod instead.');
      config['manifest']['updatePeriod'] =
          config['manifest']['dash']['updatePeriod'];
      delete config['manifest']['dash']['updatePeriod'];
    }

    // Deprecate 'manifest.hls.updatePeriod' configuration.
    if (config['manifest'] && config['manifest']['hls'] &&
        'updatePeriod' in config['manifest']['hls']) {
      shaka.Deprecate.deprecateFeature(5,
          'manifest.hls.updatePeriod configuration',
          'Please Use manifest.updatePeriod instead.');
      config['manifest']['updatePeriod'] =
          config['manifest']['hls']['updatePeriod'];
      delete config['manifest']['hls']['updatePeriod'];
    }

    // Deprecate 'manifest.dash.ignoreDrmInfo' configuration.
    if (config['manifest'] && config['manifest']['dash'] &&
        'ignoreDrmInfo' in config['manifest']['dash']) {
      shaka.Deprecate.deprecateFeature(5,
          'manifest.dash.ignoreDrmInfo configuration',
          'Please Use manifest.ignoreDrmInfo instead.');
      config['manifest']['ignoreDrmInfo'] =
          config['manifest']['dash']['ignoreDrmInfo'];
      delete config['manifest']['dash']['ignoreDrmInfo'];
    }

    // Deprecate AdvancedDrmConfiguration's videoRobustness and audioRobustness
    // as a string. It's now an array of strings.
    if (config['drm'] && config['drm']['advanced']) {
      let fixedUp = false;
      for (const keySystem in config['drm']['advanced']) {
        const {videoRobustness, audioRobustness} =
            config['drm']['advanced'][keySystem];
        if ('videoRobustness' in config['drm']['advanced'][keySystem] &&
            !Array.isArray(
                config['drm']['advanced'][keySystem]['videoRobustness'])) {
          config['drm']['advanced'][keySystem]['videoRobustness'] =
              [videoRobustness];
          fixedUp = true;
        }
        if ('audioRobustness' in config['drm']['advanced'][keySystem] &&
            !Array.isArray(
                config['drm']['advanced'][keySystem]['audioRobustness'])) {
          config['drm']['advanced'][keySystem]['audioRobustness'] =
              [audioRobustness];
          fixedUp = true;
        }
      }

      if (fixedUp) {
        shaka.Deprecate.deprecateFeature(5,
            'AdvancedDrmConfiguration\'s videoRobustness and audioRobustness',
            'These properties are no longer strings but array of strings, ' +
            'please update your usage of these properties.');
      }
    }

    // Deprecate 'streaming.forceHTTP' configuration.
    if (config['streaming'] && 'forceHTTP' in config['streaming']) {
      shaka.Deprecate.deprecateFeature(5,
          'streaming.forceHTTP configuration',
          'Please Use networking.forceHTTP instead.');
      config['networking'] = config['networking'] || {};
      config['networking']['forceHTTP'] = config['streaming']['forceHTTP'];
      delete config['streaming']['forceHTTP'];
    }

    // Deprecate 'streaming.forceHTTPS' configuration.
    if (config['streaming'] && 'forceHTTPS' in config['streaming']) {
      shaka.Deprecate.deprecateFeature(5,
          'streaming.forceHTTPS configuration',
          'Please Use networking.forceHTTP instead.');
      config['networking'] = config['networking'] || {};
      config['networking']['forceHTTPS'] = config['streaming']['forceHTTPS'];
      delete config['streaming']['forceHTTPS'];
    }

    // Deprecate 'streaming.minBytesForProgressEvents' configuration.
    if (config['streaming'] &&
        'minBytesForProgressEvents' in config['streaming']) {
      shaka.Deprecate.deprecateFeature(5,
          'streaming.minBytesForProgressEvents configuration',
          'Please Use networking.minBytesForProgressEvents instead.');
      config['networking'] = config['networking'] || {};
      config['networking']['minBytesForProgressEvents'] =
          config['streaming']['minBytesForProgressEvents'];
      delete config['streaming']['minBytesForProgressEvents'];
    }

    // Enforce inaccurateManifestTolerance: 0 when using crossBoundaryStrategy
    // different from KEEP.
    if (config['streaming'] && 'crossBoundaryStrategy' in config['streaming']) {
      if (config['streaming']['crossBoundaryStrategy'] !=
          shaka.config.CrossBoundaryStrategy.KEEP) {
        config['streaming']['inaccurateManifestTolerance'] = 0;
      }
    }

    const ret = shaka.util.PlayerConfiguration.mergeConfigObjects(
        this.config_, config, this.defaultConfig_());

    this.applyConfig_();
    return ret;
  }
Changes configuration settings on the Player.  This checks the names of
keys and the types of values to avoid coding errors.  If there are errors,
this logs them to the console and returns false.  Correct fields are still
applied even if there are other errors.  You can pass an explicit
<code>undefined</code> value to restore the default value.  This has two
modes of operation:

<p>
First, this can be passed a single "plain" object.  This object should
follow the {@link shaka.extern.PlayerConfiguration} object.  Not all fields
need to be set; unset fields retain their old values.

<p>
Second, this can be passed two arguments.  The first is the name of the key
to set.  This should be a '.' separated path to the key.  For example,
<code>'streaming.alwaysStreamText'</code>.  The second argument is the
value to set.

@param {string|!Object} config This should either be a field name or an
  object.
@param {*=} value In the second mode, this is the value to set.
@return {boolean} True if the passed config object was valid, false if
  there were invalid entries.
@export