Spaces:
Running
Running
Update index.html
Browse files- index.html +33 -4
index.html
CHANGED
@@ -608,6 +608,19 @@
|
|
608 |
width: 100%;
|
609 |
}
|
610 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
611 |
</style>
|
612 |
</head>
|
613 |
|
@@ -747,6 +760,7 @@
|
|
747 |
<div class="buttons-container">
|
748 |
<div class="left-controls">
|
749 |
<button class="control-btn" id="playPauseBtn">▶</button>
|
|
|
750 |
<span class="time-display" id="timeDisplay">00:00 / 00:00</span>
|
751 |
</div>
|
752 |
<div class="right-controls">
|
@@ -1093,7 +1107,21 @@
|
|
1093 |
document.getElementById('subtitleToggle').checked ^= true;
|
1094 |
toggleSubtitles();
|
1095 |
}
|
1096 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1097 |
// フレームプレビュー関連
|
1098 |
function showFramePreview(e) {
|
1099 |
if (!videoBlob) return;
|
@@ -1104,9 +1132,10 @@
|
|
1104 |
const previewTime = (clickX / progressRect.width) * duration;
|
1105 |
|
1106 |
// 時間表示を更新
|
1107 |
-
|
1108 |
-
|
1109 |
-
|
|
|
1110 |
|
1111 |
// プレビュー位置を更新
|
1112 |
framePreview.style.left = `${e.clientX}px`;
|
|
|
608 |
width: 100%;
|
609 |
}
|
610 |
}
|
611 |
+
|
612 |
+
.frame-time {
|
613 |
+
position: absolute;
|
614 |
+
bottom: -25px;
|
615 |
+
left: 50%;
|
616 |
+
transform: translateX(-50%);
|
617 |
+
background: rgba(0, 0, 0, 0.8);
|
618 |
+
color: #00ccff;
|
619 |
+
padding: 3px 8px;
|
620 |
+
border-radius: 4px;
|
621 |
+
font-size: 12px;
|
622 |
+
white-space: nowrap;
|
623 |
+
}
|
624 |
</style>
|
625 |
</head>
|
626 |
|
|
|
760 |
<div class="buttons-container">
|
761 |
<div class="left-controls">
|
762 |
<button class="control-btn" id="playPauseBtn">▶</button>
|
763 |
+
<button class="control-btn" id="resetBtn">↻</button>
|
764 |
<span class="time-display" id="timeDisplay">00:00 / 00:00</span>
|
765 |
</div>
|
766 |
<div class="right-controls">
|
|
|
1107 |
document.getElementById('subtitleToggle').checked ^= true;
|
1108 |
toggleSubtitles();
|
1109 |
}
|
1110 |
+
// リセットボタンの要素を取得
|
1111 |
+
const resetBtn = document.getElementById('resetBtn');
|
1112 |
+
|
1113 |
+
// リセットボタンのイベントリスナーを追加
|
1114 |
+
resetBtn.addEventListener('click', resetVideo);
|
1115 |
+
|
1116 |
+
// 動画を最初から再生する関数
|
1117 |
+
function resetVideo() {
|
1118 |
+
video.currentTime = 0;
|
1119 |
+
if (video.paused) {
|
1120 |
+
video.play();
|
1121 |
+
playPauseBtn.textContent = '⏸';
|
1122 |
+
}
|
1123 |
+
hideContextMenu();
|
1124 |
+
}
|
1125 |
// フレームプレビュー関連
|
1126 |
function showFramePreview(e) {
|
1127 |
if (!videoBlob) return;
|
|
|
1132 |
const previewTime = (clickX / progressRect.width) * duration;
|
1133 |
|
1134 |
// 時間表示を更新
|
1135 |
+
const previewMinutes = Math.floor(previewTime / 60);
|
1136 |
+
const previewSeconds = Math.floor(previewTime % 60).toString().padStart(2, '0');
|
1137 |
+
const previewMilliseconds = Math.floor((previewTime % 1) * 1000).toString().padStart(3, '0').substring(0, 2);
|
1138 |
+
frameTime.textContent = `${previewMinutes}:${previewSeconds}.${previewMilliseconds}`;
|
1139 |
|
1140 |
// プレビュー位置を更新
|
1141 |
framePreview.style.left = `${e.clientX}px`;
|