STLibrary

public final class STLibrary : STFeature

This class implements the library feature

Info:

The shared instance allows to retrieve and add tracks or contents to the user library

  • Get the shared instance of STLibrary

    Throws

    Will throw if your plan doesn’t include this feature

    Declaration

    Swift

    public static func getInstance() throws -> STLibrary

    Return Value

    Return the shared instance of STLibrary

  • @Observable List of contents in the library

    Declaration

    Swift

    @Observable
    public var contents: [STContentTransaction] { get set }
  • @Observable List of tracks in the library

    Declaration

    Swift

    @Observable
    public var tracks: [STTrackTransaction] { get set }
  • Append the list of contents with one content

    Declaration

    Swift

    public func add(content: STContent)

    Parameters

    content

    Element to add

  • Append the list of tracks with one content

    Declaration

    Swift

    public func add(track: STTrack)

    Parameters

    content

    Element to add