Spaces:
Paused
Paused
fix: 꾹 누르기 = 2배속 (저장 메뉴 차단) + clickedAt 갱신 + ⋮ 메뉴 단축
Browse files- 영상 위 contextmenu 차단 (CSS -webkit-touch-callout + JS preventDefault).
모바일 long-press 시 '다른 이름으로 저장' 안 뜨고 2배속만 동작.
- player 'play' 이벤트에서 clickedAt 갱신 (한 회차당 1회).
폰 등 다른 디바이스가 찍어둔 옛 clickedAt이 pull로 내려와 "10시간 전"으로
표시되던 문제 해결. 부팅 자동선택(silent)이라도 사용자가 ▶ 누르면 갱신.
- ⋮ 메뉴 길이 단축: '✕ 오프닝/엔딩 초기화' 별도 행 제거 → 각 마킹 버튼
우측에 작은 ✕ 인라인 통합 (2행 → 1행).
- index.html +47 -6
index.html
CHANGED
|
@@ -145,6 +145,12 @@
|
|
| 145 |
/* 브라우저 기본 컨트롤바의 전체화면 버튼 완전 제거 (controlslist 무시하는 브라우저 대응) */
|
| 146 |
#player::-webkit-media-controls-fullscreen-button { display: none !important; }
|
| 147 |
#player::-internal-media-controls-fullscreen-button { display: none !important; }
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 148 |
.video-wrap.locked .fs-zoom-btn,
|
| 149 |
.video-wrap.locked .side-toggle-btn,
|
| 150 |
.video-wrap.locked .pause-overlay,
|
|
@@ -224,6 +230,17 @@
|
|
| 224 |
padding: 8px 10px; border-radius: 4px; cursor: pointer;
|
| 225 |
border-top: 1px solid rgba(255,255,255,0.08); margin-top: 4px; }
|
| 226 |
.more-menu .more-item:hover { background: rgba(255,255,255,0.08); }
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 227 |
|
| 228 |
/* 스킵 마킹 컨텍스트 메뉴 */
|
| 229 |
.skip-ctx-menu { position: absolute; z-index: 2147483647; background: rgba(20,22,28,0.96);
|
|
@@ -883,10 +900,14 @@
|
|
| 883 |
<div class="more-sec">
|
| 884 |
<div class="more-sec-h">스킵 마킹</div>
|
| 885 |
<div class="more-skip">
|
| 886 |
-
<
|
| 887 |
-
|
| 888 |
-
|
| 889 |
-
<
|
|
|
|
|
|
|
|
|
|
|
|
|
| 890 |
</div>
|
| 891 |
</div>
|
| 892 |
</div>
|
|
@@ -1886,6 +1907,7 @@ async function playEpisode(id, sid, nid, opts = {}) {
|
|
| 1886 |
// 자동 스킵 플래그 회차마다 리셋 (op 자동점프 / ed 자동 카운트다운 각 1회씩)
|
| 1887 |
playEpisode._opAutoSkipped = false;
|
| 1888 |
playEpisode._edAutoTriggered = false;
|
|
|
|
| 1889 |
try {
|
| 1890 |
const fav = favs.find(f => f.id === id);
|
| 1891 |
const src = (fav?.source) || 'tvchak';
|
|
@@ -2426,8 +2448,14 @@ function closeAddModal() { $('#addModal').classList.remove('show'); }
|
|
| 2426 |
_exitHoldFast();
|
| 2427 |
});
|
| 2428 |
});
|
| 2429 |
-
//
|
| 2430 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 2431 |
|
| 2432 |
// 풀스크린 진입/탈출 시 — 줌 오버레이 컨트롤 토글
|
| 2433 |
const zoomCtrl = $('#zoomCtrl');
|
|
@@ -2712,6 +2740,19 @@ function saveProgressNow() {
|
|
| 2712 |
saveFavs();
|
| 2713 |
}
|
| 2714 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 2715 |
$('#player').addEventListener('pause', () => { saveProgressNow(); });
|
| 2716 |
document.addEventListener('visibilitychange', () => {
|
| 2717 |
if (document.visibilityState === 'hidden') saveProgressNow();
|
|
|
|
| 145 |
/* 브라우저 기본 컨트롤바의 전체화면 버튼 완전 제거 (controlslist 무시하는 브라우저 대응) */
|
| 146 |
#player::-webkit-media-controls-fullscreen-button { display: none !important; }
|
| 147 |
#player::-internal-media-controls-fullscreen-button { display: none !important; }
|
| 148 |
+
/* 영상 위 길게누르기 시 '다른 이름으로 저장' / 텍스트 선택 콜아웃 차단 (2배속 hold 충돌) */
|
| 149 |
+
#player {
|
| 150 |
+
-webkit-touch-callout: none;
|
| 151 |
+
-webkit-user-select: none;
|
| 152 |
+
user-select: none;
|
| 153 |
+
}
|
| 154 |
.video-wrap.locked .fs-zoom-btn,
|
| 155 |
.video-wrap.locked .side-toggle-btn,
|
| 156 |
.video-wrap.locked .pause-overlay,
|
|
|
|
| 230 |
padding: 8px 10px; border-radius: 4px; cursor: pointer;
|
| 231 |
border-top: 1px solid rgba(255,255,255,0.08); margin-top: 4px; }
|
| 232 |
.more-menu .more-item:hover { background: rgba(255,255,255,0.08); }
|
| 233 |
+
/* 스킵 마킹: 메인 버튼 + 우측 작은 ✕ 초기화 버튼 한 줄 */
|
| 234 |
+
.more-menu .more-skip-row { display: flex; align-items: stretch; gap: 4px; margin-top: 4px;
|
| 235 |
+
border-top: 1px solid rgba(255,255,255,0.08); padding-top: 4px; }
|
| 236 |
+
.more-menu .more-skip-row .more-skip-main { flex: 1; border-top: 0; margin-top: 0;
|
| 237 |
+
display: flex; align-items: center; gap: 8px; }
|
| 238 |
+
.more-menu .more-skip-row .more-skip-main .lbl { flex: 1; }
|
| 239 |
+
.more-menu .more-skip-row .more-skip-main .t { color: #ffd54a; font-variant-numeric: tabular-nums; font-size: 12px; }
|
| 240 |
+
.more-menu .more-skip-row .more-skip-main .t:empty::before { content: '—'; color: #555; }
|
| 241 |
+
.more-menu .more-skip-clear { background: transparent; border: 0; color: #ff9090;
|
| 242 |
+
font-size: 13px; padding: 0 8px; border-radius: 4px; cursor: pointer; }
|
| 243 |
+
.more-menu .more-skip-clear:hover { background: rgba(255,144,144,0.15); }
|
| 244 |
|
| 245 |
/* 스킵 마킹 컨텍스트 메뉴 */
|
| 246 |
.skip-ctx-menu { position: absolute; z-index: 2147483647; background: rgba(20,22,28,0.96);
|
|
|
|
| 900 |
<div class="more-sec">
|
| 901 |
<div class="more-sec-h">스킵 마킹</div>
|
| 902 |
<div class="more-skip">
|
| 903 |
+
<div class="more-skip-row">
|
| 904 |
+
<button class="more-item more-skip-main" data-skip="opEnd"><span class="lbl">오프닝 끝 (시작=0:00 자동)</span><span class="t" data-key="opEnd"></span></button>
|
| 905 |
+
<button class="more-skip-clear" data-skip="clearOp" title="오프닝 초기화" aria-label="오프닝 초기화">✕</button>
|
| 906 |
+
</div>
|
| 907 |
+
<div class="more-skip-row">
|
| 908 |
+
<button class="more-item more-skip-main" data-skip="edFromEnd"><span class="lbl">엔딩 스킵 시작점</span><span class="t" data-key="edFromEnd"></span></button>
|
| 909 |
+
<button class="more-skip-clear" data-skip="clearEd" title="엔딩 초기화" aria-label="엔딩 초기화">✕</button>
|
| 910 |
+
</div>
|
| 911 |
</div>
|
| 912 |
</div>
|
| 913 |
</div>
|
|
|
|
| 1907 |
// 자동 스킵 플래그 회차마다 리셋 (op 자동점프 / ed 자동 카운트다운 각 1회씩)
|
| 1908 |
playEpisode._opAutoSkipped = false;
|
| 1909 |
playEpisode._edAutoTriggered = false;
|
| 1910 |
+
playEpisode._clickedAtBumpedForCurrent = false;
|
| 1911 |
try {
|
| 1912 |
const fav = favs.find(f => f.id === id);
|
| 1913 |
const src = (fav?.source) || 'tvchak';
|
|
|
|
| 2448 |
_exitHoldFast();
|
| 2449 |
});
|
| 2450 |
});
|
| 2451 |
+
// 영상 위 contextmenu(데스크탑 우클릭 / 모바일 long-press 콜아웃)는 차단.
|
| 2452 |
+
// 막지 않으면 모바일에서 꾹 누르고 있을 때 '다른 이름으로 저장' 같은 기본 메뉴가 떠서 2배속과 충돌.
|
| 2453 |
+
wrap.addEventListener('contextmenu', (e) => {
|
| 2454 |
+
if (e.target.closest('#zoomCtrl, #moreMenu, .hls-quality, .hls-audio, .hls-sub')) return;
|
| 2455 |
+
e.preventDefault();
|
| 2456 |
+
_cancelHoldTimer();
|
| 2457 |
+
_exitHoldFast();
|
| 2458 |
+
});
|
| 2459 |
|
| 2460 |
// 풀스크린 진입/탈출 시 — 줌 오버레이 컨트롤 토글
|
| 2461 |
const zoomCtrl = $('#zoomCtrl');
|
|
|
|
| 2740 |
saveFavs();
|
| 2741 |
}
|
| 2742 |
|
| 2743 |
+
// 실제 재생 시작 → clickedAt 갱신. 다른 디바이스가 찍은 옛 clickedAt이
|
| 2744 |
+
// pull로 내려와서 "10시간 전"처럼 보이는 문제 방지. 한 번 찍으면 그 세션 동안 재발화 무시.
|
| 2745 |
+
$('#player').addEventListener('play', () => {
|
| 2746 |
+
if (!currentFavId) return;
|
| 2747 |
+
if (playEpisode._clickedAtBumpedForCurrent) return;
|
| 2748 |
+
const fav = favs.find(f => f.id === currentFavId);
|
| 2749 |
+
if (!fav) return;
|
| 2750 |
+
fav.clickedAt = Date.now();
|
| 2751 |
+
playEpisode._clickedAtBumpedForCurrent = true;
|
| 2752 |
+
saveFavs();
|
| 2753 |
+
renderFavs();
|
| 2754 |
+
});
|
| 2755 |
+
|
| 2756 |
$('#player').addEventListener('pause', () => { saveProgressNow(); });
|
| 2757 |
document.addEventListener('visibilitychange', () => {
|
| 2758 |
if (document.visibilityState === 'hidden') saveProgressNow();
|