actions: {
    $reset(): void;
    addCue(trackId, cue): void;
    addCueAtTime(trackId, time): string;
    addDefaultTrack(resourceName): void;
    addMediaBlob(mediaBlob): void;
    addMediaUrl(mediaUrl): void;
    addTag(trackId, tag): void;
    addTrack(track): void;
    cloneTrack(trackId): void;
    deleteCue(cueId): void;
    deleteCues(trackId): void;
    discardCompilation(): void;
    discardMediaUrl(mediaUrl): void;
    downloadXmlFile(proposedFileName): void;
    downloadZipPackage(proposedFileName): void;
    isFirstMediaTrack(track): boolean;
    isLastMediaTrack(track): boolean;
    loadFromFile(file): Promise<void>;
    loadFromUrl(url): Promise<string>;
    reassignCueShortcuts(trackId): void;
    removeTag(trackId, tag): void;
    removeTrack(trackId): void;
    replaceCompilation(compilation): void;
    revokeAllMediaUrls(): void;
    toMnemonicCue(cueShortcut): void;
    toNextCue(): void;
    toPreviousCue(): void;
    updateAcknowledgedVersion(version): void;
    updateBeatsPerMinute(trackId, beatsPerMinute): void;
    updateCompilationData(title, artist, album): void;
    updateCueData(cueId, description, remarks, shortcut, time): void;
    updateCueOmitFadeIn(cueId, omitFadeIn): void;
    updateCueOmitPreRoll(cueId, omitPreRoll): void;
    updateMeter(trackId, meter): void;
    updateScheduledCueId(cueId): void;
    updateSelectedCueId(cueId): void;
    updateSelectedTrackId(trackId): void;
    updateTrackData(trackId, name, artist, album): void;
    updateTrackOrder(orderedTrackIds): void;
    updateTrackOriginTime(trackId, originTime): void;
    updateTrackPreRoll(trackId, preRoll): void;
    updateTrackUrl(trackId, url): void;
    updateUseMeasureNumbers(trackId, useMeasureNumbers): void;
    useMediaFromUrl(url): Promise<string>;
} = ...

Type declaration

  • $reset:function
  • addCue:function
    • Adds (inserts) the new cue for the given track to the compilation, by inserting it by the order in time.

      Parameters

      • trackId: string
      • cue: ICue

      Returns void

  • addCueAtTime:function
    • Adds a new cue with the given time

      Parameters

      • trackId: string
      • time: number

      Returns string

      The id of the new cue

      Remarks

      Adds (inserts) the new cue for the given track to the compilation, by inserting it by the order in time.

  • addDefaultTrack:function
    • Adds a new default track for the given file name or media URL to the compilation.

      Parameters

      • resourceName: string

      Returns void

      Remarks

      Track properties are derived from the given file name or url The new track is made the selected track No media data is added, it must get handled elsewhere.

  • addMediaBlob:function
  • addMediaUrl:function
    • Adds a media blob URL to the store.

      Parameters

      Returns void

      Remarks

      A new blob URL replaces any existing with an exact same path.

  • addTag:function
    • Adds (inserts) a new tag for the given track.

      Parameters

      • trackId: string
      • tag: string

      Returns void

  • addTrack:function
    • Adds a provided track to the compilation.

      Parameters

      Returns void

      Remarks

      The new track is made the selected track No media data is added, it must get handled elsewhere.

  • cloneTrack:function
    • Clones an existing track, with it's cues.

      Parameters

      • trackId: string

      Returns void

      Remarks

      Effectively copies the track, and replaces any previous ids.

  • deleteCue:function
    • Deletes the cue

      Parameters

      • cueId: string

      Returns void

      Remarks

      Also updates the persistent store of the compilation

  • deleteCues:function
    • Deletes all cues of a track

      Parameters

      • trackId: string

      Returns void

      Remarks

      Also updates the persistent store of the compilation

  • discardCompilation:function
    • Closes/discards the current compilation

      Returns void

      Remarks

      Permanently removes the compilation with all data, including the media files and the object URL references to it from both the persistent storage and the application store. Clears the selected track and cue.

  • discardMediaUrl:function
  • downloadXmlFile:function
    • Initiates the download of the current compilation as a single XML (.xml) file

      Parameters

      • proposedFileName: string

        The proposed file name, without suffix.

      Returns void

      Remarks

      Omits media positions in the output

  • downloadZipPackage:function
    • Initiates the download of the current compilation as a ZIP (.zip) package

      Parameters

      • proposedFileName: string

        The proposed file name, without suffix.

      Returns void

  • isFirstMediaTrack:function
    • Whether the track is the first track in the set of media tracks

      Parameters

      Returns boolean

  • isLastMediaTrack:function
  • loadFromFile:function
    • Loads a single file, of any supported content.

      Parameters

      • file: File

        The file to use

      Returns Promise<void>

      Remarks

      The file might have been downloaded or loaded from the local file system. It might be a package file or a single file of any supported content. This method can be called multiple times, each resource gets appropriately added to the current compilation

  • loadFromUrl:function
    • Loads a single file (media or package file) from an URL

      Parameters

      • url: string

        The URL to load the file from

      Returns Promise<string>

      A locally usable name, derived from the URL, which can be used to match the track to the stored media file

      Remarks

      The file content might be of any supported content. This method can be called multiple times, each resource gets appropriately added to the current compilation The resource is expected to support appropriate CORS Headers

  • reassignCueShortcuts:function
    • Reassigns the cue shortcuts, starting with the first cue's shortcut.

      Parameters

      • trackId: string

      Returns void

      Remarks

      Uses the first shortcut mnemonic as seed, then incrementing the number

  • removeTag:function
    • Removes a tag from the given track.

      Parameters

      • trackId: string
      • tag: string

      Returns void

  • removeTrack:function
    • Removes an existing track, with it's cues.

      Parameters

      • trackId: string

      Returns void

      Remarks

      Removes the track from the compilation. If the selected or next cue was one of the track, the selection is cleared.

  • replaceCompilation:function
    • Replaces the current compilation with a new one

      Parameters

      Returns void

      Remarks

      If there is only a single track in the new compilation, this track becomes the active track. For single-track compilations this causes the widget player to be shown immediately. Does not set the selected cue. Does not remove any existing media. If required, this must be done separately.

  • revokeAllMediaUrls:function
    • Revokes all currently known media blob URLs

      Returns void

      Remarks

      Use this to avoid memory leaks when abandoning (but not closing) a compilation This is usually the case when the user closes the tab or browser window, without actually closing the compilation.

  • toMnemonicCue:function
    • Selects the matching cue, by the given mnemonic, if any. Cues from the active track are considered first.

      Parameters

      • cueShortcut: string

      Returns void

  • toNextCue:function
  • toPreviousCue:function
  • updateAcknowledgedVersion:function
    • Updates the version known as the (previously) acknowledged version

      Parameters

      • version: string

      Returns void

  • updateBeatsPerMinute:function
    • Updates the track BPM

      Parameters

      • trackId: string
      • beatsPerMinute: number

      Returns void

      Remarks

      Also updates the persistent store of the compilation

  • updateCompilationData:function
    • Updates the compilation data

      Parameters

      • title: string
      • artist: string
      • album: string

      Returns void

      Remarks

      Also updates the persistent store of the compilation

  • updateCueData:function
    • Updates the cue data

      Parameters

      • cueId: string
      • description: null | string
      • remarks: null | string
      • shortcut: null | string
      • time: null | number

      Returns void

      Remarks

      Also updates the persistent store of the compilation

  • updateCueOmitFadeIn:function
    • Updates whether the cue omits the fade-in duration

      Parameters

      • cueId: string
      • omitFadeIn: boolean

      Returns void

      Remarks

      Also updates the persistent store of the compilation

  • updateCueOmitPreRoll:function
    • Updates whether the cue omits the pre-roll duration

      Parameters

      • cueId: string
      • omitPreRoll: boolean

      Returns void

      Remarks

      Also updates the persistent store of the compilation

  • updateMeter:function
    • Updates the track meter.

      Parameters

      Returns void

      Remarks

      This is only relevant for music tracks

  • updateScheduledCueId:function
    • Updates the scheduled cue Id, for application-wide handling

      Parameters

      • cueId: string

      Returns void

      Remarks

      This does not control the playback itself. It is intended for display and handling purposes.

  • updateSelectedCueId:function
    • Updates the currently selected cue Id, for application-wide handling

      Parameters

      • cueId: string

      Returns void

      Remarks

      This does not control the playback itself. It is intended for display and handling purposes. Removes any explicit track id selection.

  • updateSelectedTrackId:function
    • Updates the currently selected track Id, for application-wide handling

      Parameters

      • trackId: string

      Returns void

      Remarks

      This does not control the playback itself. It is intended for display and handling purposes. Removes any previous cue id selection, then selects the first cue of this track, if available. Removes any previous next cue id selection.

  • updateTrackData:function
    • Updates the track data

      Parameters

      • trackId: string
      • name: string
      • artist: string
      • album: string

      Returns void

      Remarks

      Also updates the persistent store of the compilation

  • updateTrackOrder:function
  • updateTrackOriginTime:function
    • Updates the track origin time.

      Parameters

      • trackId: string
      • originTime: null | number

      Returns void

      Remarks

      Creates a new, initial meter, when none is available yet.

  • updateTrackPreRoll:function
    • Updates the track pre-roll

      Parameters

      • trackId: string
      • preRoll: null | number

      Returns void

      Remarks

      Also updates the persistent store of the compilation

  • updateTrackUrl:function
    • Specifically updates the track media source URL

      Parameters

      • trackId: string
      • url: string

      Returns void

      Remarks

      Also updates the persistent store of the compilation

  • updateUseMeasureNumbers:function
    • Updates whether to use the measure number to set and display the cue positions

      Parameters

      • trackId: string
      • useMeasureNumbers: null | boolean

      Returns void

  • useMediaFromUrl:function
    • Uses a single media resource from an URL, by adding the URL to the set of stored media URLs.

      Parameters

      • url: string

        The URL to use

      Returns Promise<string>

      A promise to a locally usable name, derived from the URL, which can be used to match the track to the stored media URL

      Remarks

      The resource is expected to be a single, supported media file. No further assertion about the resource is made within this method, and the resource does not need to support any CORS Headers, because it's only used as-is, as a media source. This method can be called multiple times, each URL gets appropriately added to the current compilation.