pause

The pause event is sent when a request to pause an activity is handled and the activity has entered its paused state. This is most commonly sent to media elements after their media has been paused through a call to the element's pause() method.

The contexts in which the pause event occurs:

  • Any element based on HTMLMediaElement (generally <audio> or <video>) may receive this event after its media has been paused by calling the element's pause() method.
    • The event is sent once the pause() method returns and after the media element's paused property has been changed to true.
    • A common use case is detecting when a pause has occurred in order to update the user interface, such as by switching the image displayed on a play/pause button.
  • When using the Web Speech API, a SpeechSynthesisUtterance object representing a speakable phrase receives a pause event when the controlling speech synthesis object is paused by calling SpeechSynthesis.pause().

General info

Specification
HTML Living Standard, Web Speech API
Interface
Event (HTML Media), SpeechSynthesisEvent (Web Speech API)
Bubbles
No
Cancelable
No
Target
HTMLMediaElement, SpeechSynthesisUtterance
Default Action
None.

Properties

Property Type Description
target Read only EventTarget The event target (the topmost target in the DOM tree).
type Read only DOMString The type of event.
bubbles Read only Boolean Whether the event normally bubbles or not
cancelable Read only Boolean Whether the event is cancellable or not?

Document Tags and Contributors

 Contributors to this page: Sheppy, teoli, ethertank, louisremi
 Last updated by: Sheppy,