Ovaire d'Oz Posted August 28, 2007 Share Posted August 28, 2007 Hello,I am adding WMV content to some webpages, I decided to design custom buttons to control the video, I scripted controls too but I'm facing some compatibility problems; the buttons will work only with IE. Could someone have a look a the code and help me? Thanks. // video controlfunction WMP_Button_Click(command){ var wmp = document.WMP_Video_IE; switch(command) { case "play":{wmp.controls.Play();}break; case "stop":{wmp.controls.Stop();}break; case "pause":{wmp.controls.Pause();}break; case "mute": { wmp.settings.mute = !wmp.settings.mute; } break; case "sound_up": { volume = wmp.settings.volume; volume += 20; if(volume > 100) volume=100; wmp.settings.volume = volume; } break; case "sound_down": { volume = wmp.settings.volume; volume -=20; if(volume < 0) volume=0; wmp.settings.volume = volume; } break; }}//chaptersfunction chapitre(temps){ var wmp = document.WMP_Video_IE; //time infos using substring var h = temps.substring(0,2); var m = temps.substring(3,5); var s_ms = temps.substring(6); //number of seconds calcul seconds = parseInt(h) * 3600 + parseInt(m) * 60 + parseFloat(s_ms); //Reader positionning document.WMP_Video_IE.controls.currentPosition = seconds; document.WMP_Video_IE.controls.play();} Link to comment Share on other sites More sharing options...
Synook Posted August 28, 2007 Share Posted August 28, 2007 I believe WMP controls are only available in Internet Explorer. Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.