Description
Return source and playback durations for one canvas range.
IIIF-related selectors describe image regions, canvas coordinates and media intervals. A local arithmetic helper can use a restricted syntax or rounding convention while a full IIIF request must satisfy the API and server behavior.
Return source and playback durations for one canvas range.
When to use this tool
Use IIIF Range One Canvas Duration Term when checking the stated image-region, scaling or media-range convention.
How to use the tool and how it works
- Enter startSeconds, endSeconds, playbackRate. Use the units and conventions below.
- Run the tool. Correct any format, range, or cross-field input error before interpreting the output.
- Read sourceDuration, playbackDuration. Use the output convention below.
Return source and playback durations for one canvas range. Require 0 <= startSeconds <= endSeconds and positive playbackRate; sourceDuration = end-start, playbackDuration = sourceDuration/rate.1
| Input field | Meaning and units | Accepted input |
|---|---|---|
| startSeconds | Start Seconds | Required. Finite number; minimum 0. |
| endSeconds | End Seconds | Required. Finite number. |
| playbackRate | Playback Rate | Required. Finite number; strictly above 0. |
| Output field | Interpretation | Returned shape |
|---|---|---|
| sourceDuration | Source Duration | Required. Finite number. |
| playbackDuration | Playback Duration | Required. Finite number. |
{
"input": {
"startSeconds": 10,
"endSeconds": 40,
"playbackRate": 1.5
},
"output": {
"sourceDuration": 30,
"playbackDuration": 20
}
} Limitations and assumptions
- No media metadata or playback behavior is inspected, and zero-duration ranges are accepted.
- Inputs must satisfy both the field types and the cross-field conditions above. Invalid input causes an error; a successful false flag or documented placeholder is a different result.
- Numeric calculations use binary floating point unless exact decimal-integer arithmetic is explicitly stated. No hidden measurement tolerance or decimal rounding is added; nonfinite or out-of-contract results are rejected. Numeric signed-zero results are exported as zero.
Alternative or Complementary methods
Use a conforming IIIF client and actual manifest or image information for complete request validation and resource access.
References
Similar or alternative tools
- Media Excerpt Citation Offset
Map excerpt time into relative and source coordinates.
- Caption Overlap Duration
Return overlap and union duration of two caption intervals.