일시 중지 미디어가 일시 중지되면 속성이 트리거됩니다. onpause 속성을 구현하기 위해 다음 코드를 실행할 수 있습니다 -
예시
<!DOCTYPE html>
<html>
<body>
<h2 id = "test">Play</h2>
<video id = "myid" width = "320" height = "176" controls onpause = "myFunction()">
<source src = "/html5/foo.ogg" type = "video/ogg" />
<source src = "/html5/foo.mp4" type = "video/mp4" />
Your browser does not support the video element.
</video>
<script>
function myFunction() {
document.getElementById("test").innerHTML = "Media paused!";
}
</script>
</body>
</html>