I have a custom player that I embed windows media files in. I have been using this script for awhile now but only recently added custom controls for volume and I am getting a "object or method not supported" error when I clcik the volume controls. I was hoping someone could help me spot the error in my code. Is this code outdated, or am I using the wrong command for volume? Any help appreciated. Thanks again
Here is the code (also attached in notepad)
----------------------------------------------------------
In Head of Doc
---------------------
<script language="javascript">
var bolIsPlaying;
var intVolumeBarState=4;
function videoFullScreen()
{
objMediaPlayer.DisplaySize=3;
}
function videoPlay()
{
objMediaPlayer.Play();
bolIsPlaying = true;
}
function videoStop()
{
objMediaPlayer.Stop();
bolIsPlaying = false;
}
function videoPause()
{
if(bolIsPlaying)
objMediaPlayer.Pause();
}
function videoFastReverse()
{
if(bolIsPlaying)
objMediaPlayer.FastReverse();
}
function videoFastForward()
{
if(bolIsPlaying)
objMediaPlayer.FastForward();
}
function setVolume(intVolume)
{
intVolume=((intVolume-8)*1250);
objMediaPlayer.Volume=intVolume;
}
function videoVolumeIncrease()
{
if(bolIsPlaying)
objMediaPlayer.VolumeIncrease();
}
function videoVolumeDecrease()
{
if(bolIsPlaying)
objMediaPlayer.VolumeDecrease();
}
function applicationLoad()
{
objMediaPlayer.Volume=0 // sets the volume equal to 50% of max volume. The corresponding divs are already set to the correct background colors, which is why volume change is not called here.
}
</script>
Commands on the img buttons
------------------------------
onClick="videoFastReverse()">
onClick="videoStop()">
onClick="videoPlay()">
onClick="videoPause()">
onClick="videoFastForward()">
onClick="videoFullScreen()">
onClick="videoVolumeIncrease(300)">
onClick="videoVolumeDecrease(300)">
Here is the code (also attached in notepad)
----------------------------------------------------------
In Head of Doc
---------------------
<script language="javascript">
var bolIsPlaying;
var intVolumeBarState=4;
function videoFullScreen()
{
objMediaPlayer.DisplaySize=3;
}
function videoPlay()
{
objMediaPlayer.Play();
bolIsPlaying = true;
}
function videoStop()
{
objMediaPlayer.Stop();
bolIsPlaying = false;
}
function videoPause()
{
if(bolIsPlaying)
objMediaPlayer.Pause();
}
function videoFastReverse()
{
if(bolIsPlaying)
objMediaPlayer.FastReverse();
}
function videoFastForward()
{
if(bolIsPlaying)
objMediaPlayer.FastForward();
}
function setVolume(intVolume)
{
intVolume=((intVolume-8)*1250);
objMediaPlayer.Volume=intVolume;
}
function videoVolumeIncrease()
{
if(bolIsPlaying)
objMediaPlayer.VolumeIncrease();
}
function videoVolumeDecrease()
{
if(bolIsPlaying)
objMediaPlayer.VolumeDecrease();
}
function applicationLoad()
{
objMediaPlayer.Volume=0 // sets the volume equal to 50% of max volume. The corresponding divs are already set to the correct background colors, which is why volume change is not called here.
}
</script>
Commands on the img buttons
------------------------------
onClick="videoFastReverse()">
onClick="videoStop()">
onClick="videoPlay()">
onClick="videoPause()">
onClick="videoFastForward()">
onClick="videoFullScreen()">
onClick="videoVolumeIncrease(300)">
onClick="videoVolumeDecrease(300)">
Comment