HomeWeb Components API Reference - v0.10.1
    Preparing search index...

    Class SoundSlotElement

    The SoundSlotElement interface provides properties and methods for manipulating <pc-sound> elements. The SoundSlotElement interface also inherits the properties and methods of the AsyncElement interface.

    Hierarchy (View Summary)

    Index
    soundSlot: SoundSlot | null = null

    The sound slot.

    • get asset(): string

      Gets the id of the pc-asset to use for the sound slot.

      Returns string

      The asset.

    • set asset(value: string): void

      Sets the id of the pc-asset to use for the sound slot.

      Parameters

      • value: string

        The asset.

      Returns void

    • get autoPlay(): boolean

      Gets the auto play flag of the sound slot.

      Returns boolean

      The auto play flag.

    • set autoPlay(value: boolean): void

      Sets the auto play flag of the sound slot.

      Parameters

      • value: boolean

        The auto play flag.

      Returns void

    • get closestApp(): AppElement | null

      The nearest ancestor <pc-app> element, or null if this element has no <pc-app> ancestor. The search starts at the parent, so an element never resolves to itself.

      Returns AppElement | null

      The closest app element, or null.

    • get closestEntity(): EntityElement | null

      The nearest ancestor <pc-entity> element, or null if this element has no <pc-entity> ancestor. The search starts at the parent, so an element never resolves to itself.

      Returns EntityElement | null

      The closest entity element, or null.

    • get duration(): number | null

      Gets the duration of the sound slot.

      Returns number | null

      The duration.

    • set duration(value: number | null): void

      Sets the duration of the sound slot, in seconds (or null to play the whole clip).

      Parameters

      • value: number | null

        The duration.

      Returns void

    • Called when the element is fully initialized and ready. Subclasses should call this when they're ready. Resolves the ready promise and dispatches a bubbling, composed ready event.

      Returns void