SpeechSynthesisEvent: elapsedTime プロパティ
Baseline Widely available
This feature is well established and works across many devices and browser versions. It’s been available across browsers since September 2018.
elapsedTime
は SpeechSynthesisEvent
の読み取り専用プロパティで、このイベントが発生した時点での SpeechSynthesisUtterance.text
を発話し始めてからの経過時間を秒単位で返します。
値
経過時間を秒単位で格納した浮動小数点数です。
メモ: 初期のバージョンの仕様書では、ミリ秒単位の経過時刻が必要でした。 ブラウザーの互換性一覧表を確認してください。
例
js
utterThis.onboundary = (event) => {
console.log(
`${event.name} boundary reached after ${event.elapsedTime} seconds.`,
);
};
仕様書
Specification |
---|
Web Speech API # dom-speechsynthesisevent-elapsedtime |
ブラウザーの互換性
Report problems with this compatibility data on GitHubdesktop | mobile | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|
elapsedTime | ||||||||||||
elapsedTime in milliseconds |
Legend
Tip: you can click/tap on a cell for more information.
- Full support
- Full support
- Partial support
- Partial support
- No support
- No support
- Non-standard. Check cross-browser support before using.
- Deprecated. Not for use in new websites.
The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.