soiz1 commited on
Commit
9388300
·
1 Parent(s): ab756de

Update index.html

Browse files
Files changed (1) hide show
  1. index.html +7 -5
index.html CHANGED
@@ -1015,11 +1015,13 @@ document.addEventListener('DOMContentLoaded', function() {
1015
  if (combinedAudioSource) {
1016
  combinedAudioSource.playbackRate.value = speed;
1017
  // ピッチを維持する設定
1018
- if ('preservesPitch' in combinedAudioSource) {
1019
- combinedAudioSource.preservesPitch = true;
1020
- } else if ('preservePitch' in combinedAudioSource) {
1021
- combinedAudioSource.preservePitch = true; // 古いブラウザ用
1022
- }
 
 
1023
  }
1024
 
1025
  speedValue.textContent = speed.toFixed(2) + 'x';
 
1015
  if (combinedAudioSource) {
1016
  combinedAudioSource.playbackRate.value = speed;
1017
  // ピッチを維持する設定
1018
+ if ('preservesPitch' in combinedAudioSource) {
1019
+ combinedAudioSource.preservesPitch = value; // モダンブラウザ
1020
+ } else if ('webkitPreservesPitch' in combinedAudioSource) {
1021
+ combinedAudioSource.webkitPreservesPitch = value; // 古い WebKit (Chrome <86 など)
1022
+ } else if ('mozPreservesPitch' in combinedAudioSource) {
1023
+ combinedAudioSource.mozPreservesPitch = value; // 古い Gecko (Firefox ≤100)
1024
+ }
1025
  }
1026
 
1027
  speedValue.textContent = speed.toFixed(2) + 'x';