DOM Methods
HTMLMediaElement.pause()
Requests a pause in media playback. Calling it when already paused has no effect on playback state. This method does not return a Promise. A media resource is needed to demonstrate an actual transition from playing to paused. Example result: true.
Formal Syntax & Structure
html syntaxhtml
element.pause()Return Value
undefined
No return value.
Working Example
Example Snippethtml
<video id="demo" controls></video><p> Result: <output id="result"></output></p><script> const e = document.getElementById('demo'); const result = value => { document.getElementById("result").textContent = String(value); }; e.pause(); result(e.paused);</script>