I used the following workaround - which seems to work, need more testing but
is a kludge - can anyone come up with something better?
* We try to play and quickly stop the NSPlay audio object. Windows XP (at
least) does not
* support it. method Play() will throw an exception. We use this to set the
boolean flag
* isNSPlaySupported. Preferably, this method should be called by the very
first narration slide only.
* In the HTML slide, <script>g_supportsNSPlay = SupportsNSPlay()</script>
thanks,
Anil Philip
---
for good news go to
http://members.tripod.com/~goodnewsforyou/goodnews.html
========
function ToggleVNarration()
{
rObj=PPTSld.document.all("NSPlay")
if( rObj && !PPTSld.g_animUseRuntime && g_supportsNSPlay/*NEW TEST*/) {
if( (rObj.playState == 1)||(rObj.playState == 0) )
rObj.Play()
else if( rObj.playState == 2 )
rObj.Pause()
else
return;
}
else if( PPTSld.g_animUseRuntime )
{
narObj = PPTSld.document.all("narrationID")
if( narObj )
narObj.togglePause()
}
}
var g_supportsNSPlay = false; //NEW VARIABLE
/* NEW FUNCTION - Anil Philip
* We try to play and quickly stop the NSPlay audio object. Windows XP (at
least) does not
* support it. method Play() will throw an exception. We use this to set the
boolean flag
* isNSPlaySupported. Preferably, this method should be called by the very
first narration slide only.
*/
function SupportsNSPlay()
{
rObj=parent.PPTSld.document.all("NSPlay");
try {
rObj.Play();
rObj.Stop();
} catch(e) {
return false;
}
return true;
}