CARVIEW |
Select Language
HTTP/2 200
content-type: text/html
x-guploader-uploadid: AAwnv3LOsHlqdv-TWvYSEGWtFHr01xcyPWtYP_50O-TEXsjVpxrcSndOu2fuO_U-TGokpAP3
cache-control: public, max-age=3600
expires: Thu, 09 Oct 2025 21:16:15 GMT
last-modified: Thu, 09 Oct 2025 01:12:03 GMT
etag: W/"573ae96ec8dbc8e82de875e063d4b8a8"
x-goog-generation: 1759972322975645
x-goog-metageneration: 1
x-goog-stored-content-encoding: identity
x-goog-stored-content-length: 157672
x-goog-meta-goog-reserved-file-mtime: 1759970499
x-goog-hash: crc32c=TokPOA==, md5=VzrpbsjbyOgt6HXgY9S4qA==
x-goog-storage-class: STANDARD
accept-ranges: none
alt-svc: h3=":443"; ma=2592000,h3-29=":443"; ma=2592000
alt-svc: clear
referrer-policy: strict-origin-when-cross-origin
x-content-type-options: nosniff
strict-transport-security: max-age=63072000
content-security-policy: default-src 'self'; script-src 'report-sample' 'self' 'wasm-unsafe-eval' https://www.google-analytics.com/analytics.js https://www.googletagmanager.com/gtag/js assets.codepen.io production-assets.codepen.io https://js.stripe.com 'sha256-XNBp89FG76amD8BqrJzyflxOF9PaWPqPqvJfKZPCv7M=' 'sha256-YCNoU9DNiinACbd8n6UPyB/8vj0kXvhkOni9/06SuYw=' 'sha256-PZjP7OR6mBEtnvXIZfCZ5PuOlxoDF1LDZL8aj8c42rw='; script-src-elem 'report-sample' 'self' 'wasm-unsafe-eval' https://www.google-analytics.com/analytics.js https://www.googletagmanager.com/gtag/js assets.codepen.io production-assets.codepen.io https://js.stripe.com 'sha256-XNBp89FG76amD8BqrJzyflxOF9PaWPqPqvJfKZPCv7M=' 'sha256-YCNoU9DNiinACbd8n6UPyB/8vj0kXvhkOni9/06SuYw=' 'sha256-PZjP7OR6mBEtnvXIZfCZ5PuOlxoDF1LDZL8aj8c42rw='; style-src 'report-sample' 'self' 'unsafe-inline'; object-src 'none'; base-uri 'self'; connect-src 'self' developer.allizom.org bcd.developer.allizom.org bcd.developer.mozilla.org updates.developer.allizom.org updates.developer.mozilla.org https://*.google-analytics.com https://*.analytics.google.com https://*.googletagmanager.com https://incoming.telemetry.mozilla.org https://observatory-api.mdn.allizom.net https://observatory-api.mdn.mozilla.net https://api.github.com/search/issues stats.g.doubleclick.net https://api.stripe.com; font-src 'self'; frame-src 'self' interactive-examples.mdn.mozilla.net interactive-examples.mdn.allizom.net mdn.github.io live-samples.mdn.mozilla.net live-samples.mdn.allizom.net *.mdnplay.dev *.mdnyalp.dev *.play.test.mdn.allizom.net https://v2.scrimba.com https://scrimba.com jsfiddle.net www.youtube-nocookie.com codepen.io survey.alchemer.com https://js.stripe.com; img-src 'self' data: *.githubusercontent.com *.googleusercontent.com *.gravatar.com mozillausercontent.com firefoxusercontent.com profile.stage.mozaws.net profile.accounts.firefox.com developer.mozilla.org mdn.dev interactive-examples.mdn.mozilla.net interactive-examples.mdn.allizom.net wikipedia.org upload.wikimedia.org https://mdn.github.io/shared-assets/ https://mdn.dev/ https://*.google-analytics.com https://*.googletagmanager.com www.gstatic.com; manifest-src 'self'; media-src 'self' archive.org videos.cdn.mozilla.net https://mdn.github.io/shared-assets/; child-src 'self'; worker-src 'self';
x-frame-options: DENY
origin-trial: AxVILwizhbMjxFeHOn1P3R8niO1RJY/smaK4B4d1rLzc1gTaxtXMSaTi+FoigYgCw40uFRDwFcEAeqDR+vVLOW4AAABfeyJvcmlnaW4iOiJodHRwczovL2RldmVsb3Blci5tb3ppbGxhLm9yZyIsImZlYXR1cmUiOiJQcml2YXRlQXR0cmlidXRpb25WMiIsImV4cGlyeSI6MTc0MjA3OTYwMH0=
x-cloud-trace-context: 7342bdf4f6580d3cba22e72bc7468bfc
date: Thu, 09 Oct 2025 20:16:16 GMT
server: Google Frontend
via: 1.1 google
vary: Accept-Encoding
content-encoding: gzip
x-cache: miss
Animation: playState プロパティ - Web API | MDN
Toggle sidebar
>
このページはコミュニティーの尽力で英語から翻訳されました。MDN Web Docs コミュニティーについてもっと知り、仲間になるにはこちらから。
Animation: playState プロパティ
Baseline
Widely available
This feature is well established and works across many devices and browser versions. It’s been available across browsers since 2020年3月.
Animation.playState
はウェブアニメーション API の読み取り専用プロパティで、アニメーションの再生状態を説明する列挙値を返します。
値
idle
-
アニメーションの現在の時刻は未解決で、待機タスクはありません。
running
-
アニメーションは実行中です。
paused
-
アニメーションが中断され、
Animation.currentTime
プロパティが更新されていません。 finished
-
アニメーションが境界の 1 つに達し、
Animation.currentTime
プロパティが更新されていません。
以前、ウェブアニメーションでは、再生の開始などの非同期処理がまだ完了していないことを示すために、 pending
の値を定義していました。これは、別個の Animation.pending
プロパティで示すようになりました。
例
例えばアリスの成長/縮小ゲームの例では、プレイヤーはアリスが涙を流して泣くという結末にたどり着きます。ゲームでは、パフォーマンス上の理由から、涙は見えているときだけアニメーションします。ですから、このようにアニメーションしたら、すぐに一時停止しなければなりません。
js
// 涙のアニメーションをセットアップ
tears.forEach((el) => {
el.animate(tearsFalling, {
delay: getRandomMsRange(-1000, 1000), // それぞれの涙をランダムにする
duration: getRandomMsRange(2000, 6000), // それぞれの涙をランダムにする
iterations: Infinity,
easing: "cubic-bezier(0.6, 0.04, 0.98, 0.335)",
});
el.pause();
});
// エンディングを表示する必要があるときに、涙が落ちるのを再生
tears.forEach((el) => {
el.play();
});
// 涙のアニメーションをリセットし、一時停止
tears.forEach((el) => {
el.pause();
el.currentTime = 0;
});
仕様書
Specification |
---|
Web Animations> # dom-animation-playstate> |
ブラウザーの互換性
Loading…
関連情報
- ウェブアニメーション API
Animation
: ウェブページのアニメーションを制御するためのその他のメソッドやプロパティ