Announcement

Collapse
No announcement yet.

MEDIAIsPlaying ??

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

    MEDIAIsPlaying ??

    Greetings All !

    I've got a section of a script that's giving me a bit of trouble:

    hspiWMP.Play "Media Library", "category", "hallelujah3"
    hs.WriteLog "DEBUG", "hspiWMP.MEDIAIsPlaying = " & hspiWMP.MEDIAIsPlaying
    do while hspiWMP.MEDIAIsPlaying
    hs.WaitEvents
    loop

    When I execute this, I get an error on the second line above, where "hspiWMP.MEDIAIsPlaying" gets called. I get an "object does not support this property or method" error.

    I had based that code on some similar code I found here in the forums.

    Basically, I've been trying to write a sort of generic script where, if I pass it a sound file path & name, plus a value for volume, it will locate and play it. However, I couldn't get that to work until I added the sound file to Windows Media Player's master list... and then switched to using the "hspiWMP.Play" command line above. (And, as you can see, for the moment, I've hard-coded the name of the file we are to play.)

    So, can anybody tell me what I'm doing wrong with that call the MEDIAIsPlaying? (And, if anybody's figured out how to pass Homeseer Media Player a file-path and get it to play, I'd greatly appreciate some advice on that.)


    Thanks!

    -= Dave =-

    #2
    MEDIAIsPlaying is a HomeSeer function and not a WMP plugin function.
    hspiWMP.Play "Media Library", "category", "hallelujah3"
    hs.WriteLog "DEBUG", "MEDIAIsPlaying = " & hs.MEDIAIsPlaying
    do while hs.MEDIAIsPlaying
    hs.WaitEvents
    loop


    I'm not sure what you are attempting to do here but a loop like this will slow down Homeseer and isn't accomplishing a thing.
    💁‍♂️ Support & Customer Service 🙋‍♂️ Sales Questions 🛒 Shop HomeSeer Products

    Comment


      #3
      hs.MediaIsPlaying is always false

      Does the "hs.MediaIsPlaying" funciton work in HS 2.2.0.76 and Media Player (beta) 2.4.0.11? This asp always returns a false:

      < %
      if hs.MediaIsPlaying then
      response.write "(Playing)"
      else
      response.write "(Stopped)"
      end if
      % >
      Last edited by CJVann; August 23, 2008, 12:46 PM. Reason: Script was "invisible" when viewing thread

      Comment


        #4
        hs.MediaIsPlaying ?

        Anybody ever get this to work? The hs.MediaIsPlaying function always returns a false... I'm at a loss. (Using HomeSeer Media Player Plug-in 2.4.0.27)

        <TABLE border=0 cellSpacing=2 cellPadding=0 width="100%"><TBODY><TR><TD class=LOGDateTime1 noWrap align=left>8/10/2009 10:29:22 PM </TD><TD class=LOGType1 colSpan=3 align=left>Event </TD><TD class=LOGEntry1 colSpan=8 align=left>Running script statement immediately: &hs.WriteLog("Info", hs.MediaIsPlaying)</TD></TR><TR><TD class=LOGDateTime0 noWrap align=left>8/10/2009 10:29:22 PM </TD><TD class=LOGType0 colSpan=3 align=left>Info </TD><TD class=LOGEntry0 colSpan=8 align=left>False</TD></TR></TBODY></TABLE>

        Comment

        Working...
        X