text: const MATCH_START_QUERY = /[?&#](?:start|t)=([0-9hms]+)/
  const MATCH_START_STAMP = /(\d+)(h|m|s)/g
  const MATCH_NUMERIC = /^\d+$/
  
  // Parse YouTube URL for a start time param, ie ?t=1h14m30s
  // and return the start time in seconds
  export function parseStartTime (url) {
    const match = url.match(MATCH_START_QUERY)
    if (match) {
      const stamp = match[1]
      if (stamp.match(MATCH_START_STAMP)) {
        return parseStartStamp(stamp)
      }
      if (MATCH_NUMERIC.test(stamp)) {
        return parseInt(stamp, 10)
      }
    }
    return 0
  }
  
  function parseStartStamp (stamp) {
    let seconds = 0
    let array = MATCH_START_STAMP.exec(stamp)
    while (array !== null) {
      const [, count, period] = array
      if (period === 'h') seconds += parseInt(count, 10) * 60 * 60
      if (period === 'm') seconds += parseInt(count, 10) * 60
      if (period === 's') seconds += parseInt(count, 10)
      array = MATCH_START_STAMP.exec(stamp)
    }
    return seconds
  }
  