Announcement

Collapse
No announcement yet.

How To access other properties of a music track using HSTouch

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

  • How To access other properties of a music track using HSTouch

    There may be cases where you want to display other properties of a playing music track on an HSTouch screen. For example, you want to display the composer of the currently playing track. The composer is not available using the HSTouch designer. However, this property is available from the music plugin. All music plug-ins should support this property. See the music interface documentation for information on the properties available. This is in the help for for each music plug-in.

    Save the following script in HomeSeer, then edit a text property in the HSTouch designer to display the desired property.

    Here is the script to use, save it in your scripts folder:

    Code:
     
    Function Main(parm as object)
    dim pi as object
    dim MusicApi as object
    pi = hs.Plugin("Media Player")
    MusicAPI = pi.GetMusicAPI(1)
    return MusicApi.CTComposer
    End Function
    In HSTouch, create a text element and enter the following for the Text property:

    Code:
    [$SCRIPT=&hs.runex("mp_get_composer.vb","","")]
    website | buy now | support | youtube
Working...
X