changeDefinition (to, from) {
    const { definition } = this.config

    if (Array.isArray(definition?.list)) {
      definition.list.forEach((item) => {
        if (to?.definition === item.definition) {
          this.curDefinition = item
        }
      })
    }

    if (to?.bitrate && typeof to.bitrate !== 'number') {
      to.bitrate = parseInt(to.bitrate, 10) || 0
    }

    this.emit(Events.DEFINITION_CHANGE, { from, to })
    if (!this.hasStart) {
      this.config.url = to.url
      return
    }
    const ret = this.switchURL(to.url, {
      seamless: definition.seamless !== false
        && typeof MediaSource !== 'undefined'
        && typeof MediaSource.isTypeSupported === 'function',
      ...to
    })
    if (ret && ret.then) {
      ret.then(() => {
        this.emit(Events.AFTER_DEFINITION_CHANGE, { from, to })
      })
    } else {
      this.emit(Events.AFTER_DEFINITION_CHANGE, { from, to })
    }
  }
@description change the definition of the current playback
@param { definition } to
@param { definition } [from]