docs.rodeo

MDN Web Docs mirror

SpeechSynthesisUtterance: resume event

{{APIRef("Web Speech API")}} 

The resume event of the Web Speech API {{domxref("SpeechSynthesisUtterance")}}  object is fired when a paused utterance is resumed.

Syntax

Use the event name in methods like {{domxref("EventTarget.addEventListener", "addEventListener()")}} , or set an event handler property.

addEventListener("resume", (event) => { })

onresume = (event) => { }

Event type

A {{domxref("SpeechSynthesisEvent")}} . Inherits from {{domxref("Event")}} .

{{InheritanceDiagram("SpeechSynthesisEvent")}} 

Event properties

In addition to the properties listed below, properties from the parent interface, {{domxref("Event")}} , are available.

Examples

You can use the resume event in an addEventListener method:

utterThis.addEventListener("resume", (event) => {
  console.log(`Speech resumed after ${event.elapsedTime} seconds.`);
});

Or use the onresume event handler property:

utterThis.onresume = (event) => {
  console.log(`Speech resumed after ${event.elapsedTime} seconds.`);
};

Specifications

{{Specifications}} 

Browser compatibility

{{Compat}} 

See also

In this article

View on MDN