function Hls(userConfig) {
    if (userConfig === void 0) {
      userConfig = {};
    }

    this.config = void 0;
    this.userConfig = void 0;
    this.coreComponents = void 0;
    this.networkControllers = void 0;
    this._emitter = new eventemitter3__WEBPACK_IMPORTED_MODULE_11__["EventEmitter"]();
    this._autoLevelCapping = void 0;
    this.abrController = void 0;
    this.bufferController = void 0;
    this.capLevelController = void 0;
    this.latencyController = void 0;
    this.levelController = void 0;
    this.streamController = void 0;
    this.audioTrackController = void 0;
    this.subtitleTrackController = void 0;
    this.emeController = void 0;
    this.cmcdController = void 0;
    this._media = null;
    this.url = null;
    var config = this.config = Object(_config__WEBPACK_IMPORTED_MODULE_10__["mergeConfig"])(Hls.DefaultConfig, userConfig);
    this.userConfig = userConfig;
    Object(_utils_logger__WEBPACK_IMPORTED_MODULE_9__["enableLogs"])(config.debug);
    this._autoLevelCapping = -1;

    if (config.progressive) {
      Object(_config__WEBPACK_IMPORTED_MODULE_10__["enableStreamingMode"])(config);
    } // core controllers and network loaders


    var ConfigAbrController = config.abrController,
        ConfigBufferController = config.bufferController,
        ConfigCapLevelController = config.capLevelController,
        ConfigFpsController = config.fpsController;
    var abrController = this.abrController = new ConfigAbrController(this);
    var bufferController = this.bufferController = new ConfigBufferController(this);
    var capLevelController = this.capLevelController = new ConfigCapLevelController(this);
    var fpsController = new ConfigFpsController(this);
    var playListLoader = new _loader_playlist_loader__WEBPACK_IMPORTED_MODULE_1__["default"](this);
    var keyLoader = new _loader_key_loader__WEBPACK_IMPORTED_MODULE_2__["default"](this);
    var id3TrackController = new _controller_id3_track_controller__WEBPACK_IMPORTED_MODULE_3__["default"](this); // network controllers

    var levelController = this.levelController = new _controller_level_controller__WEBPACK_IMPORTED_MODULE_5__["default"](this); // FragmentTracker must be defined before StreamController because the order of event handling is important

    var fragmentTracker = new _controller_fragment_tracker__WEBPACK_IMPORTED_MODULE_6__["FragmentTracker"](this);
    var streamController = this.streamController = new _controller_stream_controller__WEBPACK_IMPORTED_MODULE_7__["default"](this, fragmentTracker); // Cap level controller uses streamController to flush the buffer

    capLevelController.setStreamController(streamController); // fpsController uses streamController to switch when frames are being dropped

    fpsController.setStreamController(streamController);
    var networkControllers = [levelController, streamController];
    this.networkControllers = networkControllers;
    var coreComponents = [playListLoader, keyLoader, abrController, bufferController, capLevelController, fpsController, id3TrackController, fragmentTracker];
    this.audioTrackController = this.createController(config.audioTrackController, null, networkControllers);
    this.createController(config.audioStreamController, fragmentTracker, networkControllers); // subtitleTrackController must be defined before  because the order of event handling is important

    this.subtitleTrackController = this.createController(config.subtitleTrackController, null, networkControllers);
    this.createController(config.subtitleStreamController, fragmentTracker, networkControllers);
    this.createController(config.timelineController, null, coreComponents);
    this.emeController = this.createController(config.emeController, null, coreComponents);
    this.cmcdController = this.createController(config.cmcdController, null, coreComponents);
    this.latencyController = this.createController(_controller_latency_controller__WEBPACK_IMPORTED_MODULE_4__["default"], null, coreComponents);
    this.coreComponents = coreComponents;
  }
Creates an instance of an HLS client that can attach to exactly one `HTMLMediaElement`.

@constructs Hls
@param {HlsConfig} config