ManagerSpeaker

Table of Contents

Tutorials:

Methods

registerSpeaker(speaker, speakerState, callbackopt)

Registers a speaker in Homey so the user is able to select it to play music from. This function can also be called from Speaker#register

Parameters:
Name Type Attributes Description
speaker Speaker

The speaker instance to register

speakerState ManagerSpeaker#SpeakerState

The initial state of the speaker

callback genericCallbackFunction <optional>
Returns:

Promise

unregisterSpeaker(speaker, callbackopt)

Unregisters a speaker in Homey making it no longer visible in Homey Music. This function can also be called from Speaker#unregister

Parameters:
Name Type Attributes Description
speaker Speaker

The speaker instance to unregister

callback genericCallbackFunction <optional>
Returns:

Promise

Type Definitions

SpeakerState

Properties:
Name Type Attributes Description
codecs Array.<ManagerMedia#Codec> <optional>

An array of codecs that the speaker can accept

position number <optional>

The current position of the track the player is playing in ms

track ManagerMedia#Track <optional>
Type:
  • Object