Currently, there is a flash music player (audioplay) embedded on a website. Despite personal preferences against having music on websites, it was requested by the client. The functionality in question involves using JavaScript to trigger "stop" and "play," which is functioning correctly on all browsers except for IE 9+.
The specific error message displayed in IE's developer console is: SCRIPT438: Object doesn't support property or method 'stopMusic'
Below is the snippet of the JavaScript code:
<script language="JavaScript" type="text/javascript">
function getPlayer(movieName)
{
if (navigator.appName.indexOf("Microsoft") != -1)
{
return window[movieName];
}
else
{
return document[movieName];
}
}
function play2()
{
getPlayer('player2').playMusic();
}
function stop2()
{
getPlayer('player2').stopMusic();
}
</script>
To see a working example, visit: