AnimationPlaybackEvent: currentTime ããããã£
Baseline
Widely available
This feature is well established and works across many devices and browser versions. Itâs been available across browsers since 2020å¹´7æ.
currentTime 㯠AnimationPlaybackEvent ã¤ã³ã¿ã¼ãã§ã¤ã¹ã®èªã¿åãå°ç¨ããããã£ã§ãã¤ãã³ãããã¥ã¼ã«å
¥ã£ãç¬éã®ãã¤ãã³ããçæããã¢ãã¡ã¼ã·ã§ã³ã®ç¾å¨æå»ã表ãã¾ããã¤ãã³ããçæãããæå»ã«ã¢ãã¡ã¼ã·ã§ã³ã idle ã§ãã£ãå ´åãããã¯æªè§£æ±ºã«ãªãã¾ãã
å¤
ããªç§åä½ã®ç¾å¨æå»ãè¡¨ãæ°å¤ãã¾ã㯠null ã§ãã
æé精度ã®ä½ä¸
ã¿ã¤ãã³ã°æ»æããã£ã³ã¬ã¼ããªã³ãã£ã³ã°ããä¿è·ããããã«ã animation.currentTime ã®ç²¾åº¦ã¯ãã©ã¦ã¶ã¼è¨å®ã«ãã£ã¦ã¯ä¸¸ãããã¦ããå¯è½æ§ãããã¾ãã
Firefox ã§ã¯ã privacy.reduceTimerPrecision ç°å¢è¨å®ãæ¢å®ã§æå¹ã«ãªã£ã¦ããã Firefox 59 ã§ã¯ 20 ãã¤ã¯ãç§ãæ¢å®å¤ã§ãã
// Firefox 60 ã«ããã æéå¶åº¦ã®ä½ä¸ (2ms)
animation.currentTime;
// 23.404
// 24.192
// 25.514
// â¦
// `privacy.resistFingerprinting` ãæå¹ãªå ´åã®æéå¶åº¦ã®ä½ä¸
animation.currentTime;
// 49.8
// 50.6
// 51.7
// â¦
Firefox ã§ã¯ã privacy.resistFingerprinting ãæå¹ã«ããã¨ã精度ã 100ms ã¾ã㯠privacy.resistFingerprinting.reduceTimerPrecision.microseconds ã®å¤ã®ã©ã¡ãã大ããæ¹ã«ãããã¨ãã§ãã¾ãã
仿§æ¸
| Specification |
|---|
| Web Animations > # dom-animationplaybackevent-currenttime > |