Thanks for you reply. Here is some detail info. I am not sure how to get
those audio files posted, but I would be happy to e-mail them to you directly.
Client: IE 6.0, MediaPlayer 9
Server: ColdFusionMX 7, IIS 5
THe embedded player on the webpage:
<OBJECT ID="player" CLASSID="CLSID:6BF52A52-394A-11d3-B153-00C04F79FAA6"
HEIGHT=0 WIDTH=0 >
<PARAM NAME="autoStart" VALUE="True">
</OBJECT>
the playlist:
<?wpl version="1.0"?>
<smil>
<head>
<meta name="Generator" content="Microsoft Windows Media Player --
9.0.0.3354"/>
<author/>
<title>PRC05</title>
</head>
<body>
<seq>
<media src="...somepath...\Audio_F\English\PRC05.wma"/>
<media
src="...somepath...\Audio_F\English\responseset_REPEAT.wma"/>
</seq>
</body>
</smil>
Audio get's started using :
function repeat() {
if (voice == 1) player.URL="Audio_F/English/PRC05.wpl";
}
I have tested the files individually and reponseset_repeat.wma has the
markers 1-5.
the player event script for the markerhit:
<SCRIPT LANGUAGE="JScript" FOR=player EVENT=markerHit(mymark)>
//before the line that is read is highlighted save the current color for
resetting once the next question
//is read and the hit mark applied in the audio file
//saving the color allows for different color schemes
if (mymark == 1) {
if (!document.getElementById("L0")) {
document.forms[0].elements["L0"].style.backgroundColor=currcolor0;
return;
}
currcolor0 = document.forms[0].elements["L0"].style.backgroundColor;
document.forms[0].elements["L0"].style.backgroundColor="#Hi#";
}
if (mymark == 2) {
if (!document.getElementById("L1")) {
document.forms[0].elements["L0"].style.backgroundColor=currcolor0;
return;
}
currcolor1 = document.getElementById("L1").style.backgroundColor;
document.forms[0].elements["L0"].style.backgroundColor=currcolor0;
document.forms[0].elements["L1"].style.backgroundColor="#Hi#";
}
if (mymark == 3) {
if (!document.getElementById("L2")) {
document.forms[0].elements["L1"].style.backgroundColor=currcolor1;
return;
}
currcolor2 = document.getElementById("L2").style.backgroundColor;
document.forms[0].elements["L1"].style.backgroundColor=currcolor1;
document.forms[0].elements["L2"].style.backgroundColor="#Hi#";
}
if (mymark == 4) {
if (!document.getElementById("L3")) {
document.forms[0].elements["L2"].style.backgroundColor=currcolor2;
return;
}
currcolor3 = document.getElementById("L3").style.backgroundColor;
document.forms[0].elements["L2"].style.backgroundColor=currcolor2;
document.forms[0].elements["L3"].style.backgroundColor="#Hi#";
}
if (mymark == 5) {
if (!document.getElementById("L4")) {
document.forms[0].elements["L3"].style.backgroundColor=currcolor3;
return;
}
currcolor4 = document.getElementById("L4").style.backgroundColor;
document.forms[0].elements["L3"].style.backgroundColor=currcolor3;
document.forms[0].elements["L4"].style.backgroundColor="#Hi#";
}
if (mymark == 6) {
if (!document.getElementById("L5")) {
document.forms[0].elements["L4"].style.backgroundColor=currcolor4;
return;
}
currcolor5 = document.getElementById("L5").style.backgroundColor;
document.forms[0].elements["L4"].style.backgroundColor=currcolor4;
document.forms[0].elements["L5"].style.backgroundColor="#Hi#";
}
if (mymark == 7) {
if (!document.getElementById("L6")) {
document.forms[0].elements["L5"].style.backgroundColor=currcolor5;
return;
}
currcolor6 = document.getElementById("L6").style.backgroundColor;
document.forms[0].elements["L5"].style.backgroundColor=currcolor5;
document.forms[0].elements["L6"].style.backgroundColor="#Hi#";
}
if (mymark == 8) {
if (!document.getElementById("L7")) {
document.forms[0].elements["L6"].style.backgroundColor=currcolor6;
return;
}
currcolor7 = document.getElementById("L7").style.backgroundColor;
document.forms[0].elements["L6"].style.backgroundColor=currcolor6;
document.forms[0].elements["L7"].style.backgroundColor="#Hi#";
}
if (mymark == 9) {
if (!document.getElementById("L8")) {
document.forms[0].elements["L7"].style.backgroundColor=currcolor7;
return;
}
currcolor8 = document.getElementById("L8").style.backgroundColor;
document.forms[0].elements["L7"].style.backgroundColor=currcolor7
document.forms[0].elements["L8"].style.backgroundColor="#Hi#";
}
if (mymark == 10) {
if (!document.getElementById("L9")) {
document.forms[0].elements["L8"].style.backgroundColor=currcolor8;
return;
}
currcolor9 = document.getElementById("L9").style.backgroundColor;
document.forms[0].elements["L8"].style.backgroundColor=currcolor8;
document.forms[0].elements["L9"].style.backgroundColor="#Hi#";
}
</SCRIPT>
> >I am playing a playlist with two items. The first item has no marker, the
> >second item has markers in it and they won't trigger when played in the
[quoted text clipped - 23 lines]
> Digital Media MVP : 2004-2007
> http://mvp.support.microsoft.com/mvpfaqs
The value here should be quoted :
<SCRIPT LANGUAGE="JScript" FOR=player EVENT=markerHit(mymark)>
should at least read
<SCRIPT LANGUAGE="JScript" FOR="player" EVENT="markerHit('mymark')">
If you had javascript error reporting turned on in your browser, you'd
see it straight away. The code you have at present is looking for a
markerhit event, and passing the variable mymark, not the literal
string value 'mymark'. Since it's likely the mymark variable is not
declared anywhere, javascript will throw an error at that point.
Unfortunately there are likely to be so many things wrong with the
HTML from the sample you posted, it's hard to know where to begin to
fix the rest.
Run the HTML page through the W3C validator here
http://validator.w3.org/#validate_by_input
Paste the View-Source of your HTML page into that, and fix all the
markup errors. That'll be principally quoting all atrributes, then
when it's valid XHTML we can move forward with actual code issues.
You don't need to post the audio files here, just setup a static, demo
webpage with a complete but *minimal* set of HTML, javascript and WMA
files to reproduce the issue (i.e. start small, then make the big
changes when that's working)
HTH
Cheers - Neil
>Thanks for you reply. Here is some detail info. I am not sure how to get
>those audio files posted, but I would be happy to e-mail them to you directly.
[quoted text clipped - 160 lines]
>> Digital Media MVP : 2004-2007
>> http://mvp.support.microsoft.com/mvpfaqs
------------------------------------------------
Digital Media MVP : 2004-2007
http://mvp.support.microsoft.com/mvpfaqs
baerbel - 30 Nov 2007 15:11 GMT
Neil,
I think you are missing the mark here (no pun intended).
While there may be some HTML 'inconsistencies' they should have not impact
on WMP and it's function.
The page does not return any JS errors. Your suggested js change will
however create a javascript error. Please refer to MS WMP events for syntax
and parameters.
suggested change:
<SCRIPT TYPE="TEXT/JSCRIPT" LANGUAGE="JScript" FOR="player"
EVENT="markerHit('mymark')">
correct:
<SCRIPT TYPE="TEXT/JSCRIPT" LANGUAGE="JScript" FOR="player"
EVENT="markerHit(mymark)">
Baerbel
> The value here should be quoted :
>
[quoted text clipped - 197 lines]
> Digital Media MVP : 2004-2007
> http://mvp.support.microsoft.com/mvpfaqs