feat(op/folder): click video card to open inline player
관리자 폴더 화면에서도 영상 카드를 좌클릭하면 공개 폴더와 동일한 내부 팝업 플레이어로 재생되도록 함. 우클릭 컨텍스트 메뉴 (수정/이름 변경/삭제) 는 그대로 유지. - 카드에 data-video-id 추가해 기존 player.js 가 인식하게 함 - 페이지에 playerOverlay HTML 과 player.js 스크립트 포함 - window.__SITE__.folder 도 함께 노출해 player.js 의 가정 충족 Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
@@ -25,7 +25,7 @@
|
|||||||
<p class="muted">이 폴더에 영상이 없습니다. 우측 상단에서 영상을 추가하세요.</p>
|
<p class="muted">이 폴더에 영상이 없습니다. 우측 상단에서 영상을 추가하세요.</p>
|
||||||
<% } %>
|
<% } %>
|
||||||
<% videos.forEach(function (v) { %>
|
<% videos.forEach(function (v) { %>
|
||||||
<div class="videoCard adminVideo" data-id="<%= v.id %>" data-title="<%= v.title %>">
|
<div class="videoCard adminVideo" data-id="<%= v.id %>" data-video-id="<%= v.id %>" data-title="<%= v.title %>">
|
||||||
<div class="videoThumb">▶</div>
|
<div class="videoThumb">▶</div>
|
||||||
<div class="videoTitle"><%= v.title %></div>
|
<div class="videoTitle"><%= v.title %></div>
|
||||||
<% if (v.sourceType === 'youtube' && !v.originalFile.includes('original.') === false) { %>
|
<% if (v.sourceType === 'youtube' && !v.originalFile.includes('original.') === false) { %>
|
||||||
@@ -42,9 +42,19 @@
|
|||||||
<button type="button" data-action="delete" class="dangerLink">삭제</button>
|
<button type="button" data-action="delete" class="dangerLink">삭제</button>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<div class="playerOverlay" id="playerOverlay" hidden>
|
||||||
|
<div class="playerModal" role="dialog" aria-modal="true">
|
||||||
|
<button type="button" class="playerClose" id="playerClose" aria-label="닫기">✕</button>
|
||||||
|
<div class="playerTitle" id="playerTitle"></div>
|
||||||
|
<video id="playerVideo" controls preload="metadata"></video>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
window.__OP__ = { folder: <%- jsonForScript(folder) %> }
|
window.__OP__ = { folder: <%- jsonForScript(folder) %> }
|
||||||
|
window.__SITE__ = { folder: <%- jsonForScript(folder) %> }
|
||||||
</script>
|
</script>
|
||||||
<script src="/static/folder.js"></script>
|
<script src="/static/folder.js"></script>
|
||||||
|
<script src="/static/player.js"></script>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
|||||||
Reference in New Issue
Block a user