@pond-ts/fit API Reference
    Preparing search index...

    Class Activity

    The whole recording: identity and metadata, plus everything a Section answers.

    Hierarchy (View Summary)

    Index

    Properties

    fromSeconds: number

    Elapsed seconds from the activity's start (the Span pair).

    label: string
    toSeconds: number

    Accessors

    • get changes(): EditChange[]

      What the edit changed in this activity, in order along the original recording: only what took effect (a crop that cut something, a join where a lap started), and for one of several parts only what falls in it, with the part splits at its ends.

      Returns EditChange[]

    • get environment(): "pool" | "open-water" | null

      Where a swim was: 'pool' or 'open-water'; null for any other sport, or a swim whose record doesn't say. Informational: to reach a pool swim's pool, segments and repeats, narrow with isPoolSwim.

      Returns "pool" | "open-water" | null

    • get parts(): readonly Activity[]

      Every activity the edit made, in order; this one is among them. Just this one when the edit made no parts, or when unedited.

      Returns readonly Activity[]

    Methods

    • The recording edited: cropped, laps split or joined, or split into several activities. Every position is a duration from the original recording's start, so editing an edited activity starts again from the original, and the same edit always means the same thing. Throws a RangeError on a crop that keeps nothing, a part split outside it, or a crop of a recording with no timestamps.

      Parameters

      Returns Activity

    • Any stretch, by elapsed time or by distance from the start, held to the recording. Throws a RangeError when its end comes before its start, when it lies wholly outside the recording, or when it asks for elapsed time from a recording with no timestamps.

      Parameters

      Returns Section