Announcement

Collapse
No announcement yet.

Mute/Unmute via script?

Collapse
This topic is closed.
X
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Mute/Unmute via script?

    So if I'm reading the manual correctly this should toggle the itunes mute. From mute to unmute, but it will only mute the player, can't get it t unmute? is it the script? or the documentation is incorrect?

    ' ************** Toggle Itunes mute On/Off
    Sub toggleItunesMute(Optional ByVal pParms As String = "")
    Dim pi As Object
    Dim MusicApi As Object

    pi = hs.Plugin("iTunes")
    MusicApi = pi.GetMusicAPI(1)

    If MusicApi.playerMute Then
    hs.writelog("info", "Setting player to unmute")
    MusicApi.playerMute = False
    Else
    hs.writelog("info", "Setting player to mute")
    MusicApi.playerMute = True
    End if

    End Sub
    HS3 Pro Edition 3.0.0.435 (Windows 10 vmware)
    BLOccupied:,UltraNetCam3:,weatherXML:,RFXCOM:,Current Cost 3P:,UltraGCIR3:
    DMMQTT:,Kodi:,Z-Wave:,BLRadar:,EasyTrigger:,MySensors:,BLBackup:
Working...
X