Playing Song's info in browser
Posted: Sun Aug 06, 2006 11:28 am
In http://www.mediamonkey.com/forum/viewto ... t=15#55352, DiddeLeeDoo wrote:

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
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
I opened a new thread to keep the other one on topicDiddeLeeDoo 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'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>

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