Playing Song's info in browser

Download and get help for different MediaMonkey for Windows 4 Addons.

Moderators: Peke, Gurus

jn
Posts: 61
Joined: Mon Jul 24, 2006 2:50 pm
Location: Germany

Playing Song's info in browser

Post by jn »

In http://www.mediamonkey.com/forum/viewto ... t=15#55352, DiddeLeeDoo wrote:
DiddeLeeDoo wrote:BTW, that Songs.htm is pretty cool too, and I know some have requested a Large Text Display of what's playing, and that Songs.htm do that by simply changing the font size number.

You most likely know about a good way to make this Songs.htm self refreshing at song change when opened separately in Internet Explorer. (now it works fine by hitting F5 to refresh)

Then all you have to do is to hit F11 and fill the whole screen with info about what's playing. (and making a .htm pretty is a fun little thing to do for anyone)
I opened a new thread to keep the other one on topic ;-)

I'm not very sure what you are trying to accomplish. Do you want to use the "standalone" Internet explorer?
I don't think there is an easy way to inform the browser that a new title started. However, you can use a timer to check every x seconds and refresh accordingly.
Using the script from the thread mentioned above, one would use

Code: Select all

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
  <head>
    <title>
      Song details
    </title>
    <style type="text/css">
/*<![CDATA[*/
body {
  background-color: White;
  font-family: Verdana;
  font-size: 8pt;
  margin: 0.1em;
}
/*]]>*/
    </style>
    <script type="text/vbscript" language="VBScript">
'<![CDATA[
Option Explicit
Dim SDB
Sub Window_OnLoad 
    'Connect to MM
    Set SDB = CreateObject("SongsDB.SDBApplication")
    window.setInterval "Update", 2000
End Sub
Sub Update
    Dim item
    Set item = SDB.Player.CurrentSong
 
    document.getElementById("artist").InnerHTML =  item.ArtistName
    document.getElementById("title").InnerHTML =  item.Title
    document.getElementById("album").InnerHTML =  item.AlbumName
    Set item = Nothing
End Sub
//]]>
  </script>
  </head>
  <body>
    Artist: <span id="artist"></span> <br />
    Title: <span id="title"></span> <br />
    Album: <span id="album"></span>
  </body>
</html>
This will update the information every 2 seconds (window.setInterval "Update", 2000 -- the 2000 means 2000 milliseconds). It even makes a nice item on the Active Desktop ;-)

But beware that as long the browser is open, MM can't be closed (it can, but reopens in the next 2 secs). The
Detailed Song Info Panel
contains a hta script that illustrates a technique to make sure that MM is running before creating the respective ActiveX control.

I'm sure that the Detailed Song Info Panel can be tweaked easily to achive what you are looking for.

HTH,

Jörg
DiddeLeeDoo
Posts: 1017
Joined: Wed Mar 01, 2006 1:09 am
Location: In a jungle down under
Contact:

Post by DiddeLeeDoo »

Works very nicely, thank you.

Hope that can inspire some that is comfortable with .html stuff to make some cool looking large display solution.

Trying to figure out how to do the same with java. I think that's possible too. Guess with Java it would be compatible with other browsers that Internet Explorer too.

BTW.
SDB.ShutdownAfterDisconnect=False

prevent MediaMonkey to close after being woken up by the CreateObject line.
Image
Post Reply