Signature
parseTimecodeInput(value: string, options: TimecodeParseOptions = {}): number | nullParameters
| Name | Type | Description |
|---|---|---|
| value | string | User-entered timecode text. |
| options | TimecodeParseOptions | Optional rounding and frame-rate settings. |
Returns
number | null
Parsed seconds with the requested rounding, or `null` when invalid.
Examples
parseTimecodeInput('90.5'); // 90.5parseTimecodeInput('1:30.25'); // 90.25parseTimecodeInput('60s'); // 60parseTimecodeInput('500ms'); // 0.5parseTimecodeInput('2m'); // 120parseTimecodeInput('24f', { frameRate: 24 }); // 1parseTimecodeInput('00:01:30:12', { frameRate: 24 }); // 90.5parseTimecodeInput('00:01:00;02', { frameRate: { numerator: 30000, denominator: 1001 }, dropFrame: true,}); // 60.06