function timeCodeToSeconds (time, fps = 25) {

	if (typeof time !== 'string') {
		throw new TypeError('Time must be a string');
	}

	if (time.indexOf(';') > 0) {
		time = time.replace(';', ':');
	}

	if (!/\d{2}(\:\d{2}){0,3}/i.test(time)) {
		throw new TypeError('Time code must have the format `00:00:00`');
	}

	const parts = time.split(':');

	let
		output,
		hours = 0,
		minutes = 0,
		seconds = 0,
		frames = 0,
		totalMinutes = 0,
		dropFrames = Math.round(fps * 0.066666), // Number of drop frames to drop on the minute marks (6%)
		timeBase = Math.round(fps),
		hFrames = timeBase * 3600,
		mFrames = timeBase * 60
	;

	switch (parts.length) {
		default:
		case 1:
			seconds = parseInt(parts[0], 10);
			break;
		case 2:
			minutes = parseInt(parts[0], 10);
			seconds = parseInt(parts[1], 10);
			break;
		case 3:
			hours = parseInt(parts[0], 10);
			minutes = parseInt(parts[1], 10);
			seconds = parseInt(parts[2], 10);
			break;
		case 4:
			hours = parseInt(parts[0], 10);
			minutes = parseInt(parts[1], 10);
			seconds = parseInt(parts[2], 10);
			frames = parseInt(parts[3], 10);
			break;
	}

	if (isDropFrame(fps)) {
		totalMinutes = (60 * hours) + minutes;
		output = ((hFrames * hours) + (mFrames * minutes) + (timeBase * seconds) + frames) - (dropFrames * (totalMinutes - (Math.floor(totalMinutes / 10))));
	} else {
		output = (( hFrames * hours ) + ( mFrames * minutes  ) + fps * seconds + frames) / fps;
	}

	return parseFloat(output.toFixed(3));
}
Convert a '00:00:00' time string into seconds

@param {String} time
@param {Number} fps - Frames per second
@return {Number}