soiz1 commited on
Commit
cbdb385
·
1 Parent(s): ee4b706

Update index.html

Browse files
Files changed (1) hide show
  1. index.html +13 -13
index.html CHANGED
@@ -751,9 +751,10 @@ if ('serviceWorker' in navigator) {
751
  </div>
752
 
753
  <h1>高度な音声動画プレイヤー</h1>
754
- <div class="settings" hidden>
 
755
  <h2>サービスワーカー設定</h2>
756
- <div class="setting-item">
757
  <label><input type="checkbox" id="sw-video" checked> 動画ファイル (/v.mp4)</label>
758
  </div>
759
  <div class="setting-item">
@@ -794,7 +795,7 @@ if ('serviceWorker' in navigator) {
794
  </div>
795
  <div class="setting-item">
796
  <label><input type="checkbox" id="sw-root" checked> ルートファイル (/)</label>
797
- </div>
798
  <button class="combine-button" id="sw-register-btn">登録を開始</button>
799
  <div class="combine-status" id="sw-status"></div>
800
  </div>
@@ -865,22 +866,22 @@ if ('serviceWorker' in navigator) {
865
  <label for="loop">ループ再生:</label>
866
  <input type="checkbox" id="loop" disabled>
867
  </div>
868
- <div class="setting-item">
869
- <label for="tempo">テンポ (BPM):</label>
870
- <input type="number" id="tempo" min="40" max="200" value="92" step="1">
871
- <span id="tempo-speed-value">1.00x</span>
872
- </div>
873
  <div class="setting-item">
874
  <div class="global-volume-container">
875
  <label>全体音量係数:</label>
876
- <input type="range" class="global-volume-slider" id="global-volume" min="0" max="10" step="0.01" value="0.5" disabled>
877
  <span class="slider-value" id="global-volume-value">0.5</span>
878
  </div>
879
  </div>
 
 
 
 
 
880
  <div class="setting-item">
881
  <div class="playback-speed-container">
882
  <label>再生速度:</label>
883
- <input type="range" class="playback-speed-slider" id="playback-speed" min="0.5" max="2" step="0.01" value="1" disabled>
884
  <span class="slider-value" id="playback-speed-value">1.00x</span>
885
  </div>
886
  </div>
@@ -1666,7 +1667,7 @@ document.addEventListener('DOMContentLoaded', function() {
1666
  function updateVolumeIcon() {
1667
  if (video.volume === 0) {
1668
  volumeBtn.textContent = '🔇';
1669
- } else if (video.volume < 0.5) {
1670
  volumeBtn.textContent = '🔈';
1671
  } else {
1672
  volumeBtn.textContent = '🔊';
@@ -1701,8 +1702,7 @@ document.addEventListener('DOMContentLoaded', function() {
1701
  const baseTempo = isTMode ? 66 : 92;
1702
  const speed = tempo / baseTempo;
1703
 
1704
- // 速度を0.5~2.0の範囲に制限
1705
- const clampedSpeed = Math.max(0.01, Math.min(2.0, speed));
1706
 
1707
  playbackSpeedSlider.value = clampedSpeed;
1708
  playbackSpeedValue.textContent = clampedSpeed.toFixed(2) + 'x';
 
751
  </div>
752
 
753
  <h1>高度な音声動画プレイヤー</h1>
754
+ <div class="settings">
755
+
756
  <h2>サービスワーカー設定</h2>
757
+ <div hidden><div class="setting-item">
758
  <label><input type="checkbox" id="sw-video" checked> 動画ファイル (/v.mp4)</label>
759
  </div>
760
  <div class="setting-item">
 
795
  </div>
796
  <div class="setting-item">
797
  <label><input type="checkbox" id="sw-root" checked> ルートファイル (/)</label>
798
+ </div></div>
799
  <button class="combine-button" id="sw-register-btn">登録を開始</button>
800
  <div class="combine-status" id="sw-status"></div>
801
  </div>
 
866
  <label for="loop">ループ再生:</label>
867
  <input type="checkbox" id="loop" disabled>
868
  </div>
 
 
 
 
 
869
  <div class="setting-item">
870
  <div class="global-volume-container">
871
  <label>全体音量係数:</label>
872
+ <input type="range" class="global-volume-slider" id="global-volume" min="0" max="10" step="0.01" value="5" disabled>
873
  <span class="slider-value" id="global-volume-value">0.5</span>
874
  </div>
875
  </div>
876
+ <div class="setting-item">
877
+ <label for="tempo">テンポ (BPM):</label>
878
+ <input type="number" id="tempo" min="40" max="200" value="92" step="1">
879
+ <span id="tempo-speed-value">1.00x</span>
880
+ </div>
881
  <div class="setting-item">
882
  <div class="playback-speed-container">
883
  <label>再生速度:</label>
884
+ <input type="range" class="playback-speed-slider" id="playback-speed" min="0.01" max="5" step="0.01" value="1" disabled>
885
  <span class="slider-value" id="playback-speed-value">1.00x</span>
886
  </div>
887
  </div>
 
1667
  function updateVolumeIcon() {
1668
  if (video.volume === 0) {
1669
  volumeBtn.textContent = '🔇';
1670
+ } else if (video.volume < 3) {
1671
  volumeBtn.textContent = '🔈';
1672
  } else {
1673
  volumeBtn.textContent = '🔊';
 
1702
  const baseTempo = isTMode ? 66 : 92;
1703
  const speed = tempo / baseTempo;
1704
 
1705
+ const clampedSpeed = Math.max(0.01, Math.min(5.0, speed));
 
1706
 
1707
  playbackSpeedSlider.value = clampedSpeed;
1708
  playbackSpeedValue.textContent = clampedSpeed.toFixed(2) + 'x';