Update index.html
Browse files- index.html +31 -9
index.html
CHANGED
@@ -963,7 +963,19 @@ document.addEventListener('DOMContentLoaded', function() {
|
|
963 |
const previewTime = document.getElementById('preview-time');
|
964 |
const bufferingIndicator = document.getElementById('buffering-indicator');
|
965 |
const syncStatus = document.getElementById('sync-status');
|
966 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
967 |
// 音声オブジェクトを作成
|
968 |
const audioElements = {};
|
969 |
const audioBuffers = {};
|
@@ -1580,16 +1592,26 @@ document.addEventListener('DOMContentLoaded', function() {
|
|
1580 |
updatePlaybackRate(speed);
|
1581 |
});
|
1582 |
|
1583 |
-
|
1584 |
-
|
1585 |
-
|
1586 |
-
|
1587 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1588 |
|
1589 |
-
|
1590 |
-
|
1591 |
-
|
|
|
1592 |
}
|
|
|
1593 |
|
1594 |
// 全画面ボタン
|
1595 |
fullscreenBtn.addEventListener('click', function() {
|
|
|
963 |
const previewTime = document.getElementById('preview-time');
|
964 |
const bufferingIndicator = document.getElementById('buffering-indicator');
|
965 |
const syncStatus = document.getElementById('sync-status');
|
966 |
+
// 動画要素にピッチ保持を設定
|
967 |
+
video.preservesPitch = true;
|
968 |
+
video.mozPreservesPitch = true;
|
969 |
+
video.webkitPreservesPitch = true;
|
970 |
+
|
971 |
+
// 合成音声のaudio要素を作成
|
972 |
+
combinedAudioElement = new Audio(url);
|
973 |
+
// ピッチ保持を設定
|
974 |
+
combinedAudioElement.preservesPitch = true;
|
975 |
+
combinedAudioElement.mozPreservesPitch = true;
|
976 |
+
combinedAudioElement.webkitPreservesPitch = true;
|
977 |
+
|
978 |
+
|
979 |
// 音声オブジェクトを作成
|
980 |
const audioElements = {};
|
981 |
const audioBuffers = {};
|
|
|
1592 |
updatePlaybackRate(speed);
|
1593 |
});
|
1594 |
|
1595 |
+
function updatePlaybackRate(speed) {
|
1596 |
+
if (!isAudioCombined) return;
|
1597 |
+
|
1598 |
+
currentPlaybackRate = speed;
|
1599 |
+
video.playbackRate = speed;
|
1600 |
+
|
1601 |
+
// ピッチ保持を再設定
|
1602 |
+
video.preservesPitch = true;
|
1603 |
+
video.mozPreservesPitch = true;
|
1604 |
+
video.webkitPreservesPitch = true;
|
1605 |
+
|
1606 |
+
if (combinedAudioElement) {
|
1607 |
+
combinedAudioElement.playbackRate = speed;
|
1608 |
|
1609 |
+
// 音声のピッチ保持を再設定
|
1610 |
+
combinedAudioElement.preservesPitch = true;
|
1611 |
+
combinedAudioElement.mozPreservesPitch = true;
|
1612 |
+
combinedAudioElement.webkitPreservesPitch = true;
|
1613 |
}
|
1614 |
+
}
|
1615 |
|
1616 |
// 全画面ボタン
|
1617 |
fullscreenBtn.addEventListener('click', function() {
|