Hi,
My design page contains Media player control and a button.
Requirement is:
When video starts playing button should be disable.
Button should get enable once video finish.
How to do this in c#. Please help me.. Its very urgent
Know the answer? Post it — somebody with the same question will find it here.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.
Pradeep ShetPosted May 12, 2015, 4:26 PM
Please find the code below, hoe
HTML CODE
JAVASCRIPT
function PlayOrPause()
{
var v = document.getElementById('vid');
if (v.paused || v.ended)
{
v.play();
document.getElementById('BtnPlay').value = "Pause";
document.getElementById('BtnPlay').style.disabled = "disabled";
}
else
{
v.pause();
document.getElementById('BtnPlay').value = "Play";
document.getElementById('BtnPlay').style.disabled = "";
}
}
Please don't forget to mark it as answered if it solves your problem.