Safariのplayイベント・playingイベントは信用できない.js
2024-07-29
Safari💢💢💢💢💢💢💢💢💢💢
何事?
仕様ではHTMLMediaElementのplayイベントは (原文)
Fired when : The element is no longer paused. Fired after the play() method has returned, or when the autoplay attribute has caused playback to begin.
(和訳)
その要素がもはや一時停止状態ではないときに発火する。HTMLMediaElement.play()が返ってきたあと、もしくは自動再生属性により再生が開始されたときに発火する。
と説明されてる。
code:log.txt
The logs will be output here.
The "currentTime" of "play" and "playing" should be very close to 1.0000.
play :
currentTime : 0.9770
playing :
currentTime : 0.9775
play().then() :
currentTime : 0.9776
timeupdate :
currentTime : 1.2326
fired at : 0.2305
diff : 1.0021
code:log.txt
The logs will be output here.
The "currentTime" of "play" and "playing" should be very close to 1.0000.
play :
currentTime : 0.6634
playing :
currentTime : 0.6656
play().then() :
currentTime : 0.6667
timeupdate :
currentTime : 0.9225
fired at : 0.1067
diff : 0.8158
code:log.txt
The logs will be output here.
The "currentTime" of "play" and "playing" should be very close to 1.0000.
play :
currentTime : 0.7272
playing :
currentTime : 0.7276
play().then() :
currentTime : 0.7278
timeupdate :
currentTime : 0.9781
fired at : 0.0682
diff : 0.9099
code:log.txt
play :
currentTime : 0.7704
playing :
currentTime : 0.7716
play().then() :
currentTime : 0.7723
timeupdate :
currentTime : 1.0145
fired at : 0.0657
diff : 0.9488
code:log.txt
The logs will be output here.
The "currentTime" of "play" and "playing" should be very close to 1.0000.
play :
currentTime : 0.7290
playing :
currentTime : 0.7293
play().then() :
currentTime : 0.7295
timeupdate :
currentTime : 0.9777
fired at : 0.0675
diff : 0.9102
これを使って音声再生開始タイミングをWorkerに渡したかったのに、死
解決策
再生タイミングは揃ったので良しとします良くない!!!!!!!!!!!!!なぜ判定と描画がずれるのだ!!!!!