Files
make_video_site/views/player.ejs
Claude (owner) 7105349a45 feat(stream): canonical folder-path video file URL
영상 파일 스트림 정규 주소를 재생 페이지와 동일한 폴더 경로 규칙으로 변경:
  /api/video/:topName[/:subName]/:videoId
경로의 폴더 부분이 영상 위치와 일치할 때만 200, 불일치 시 404.
재생 페이지(/video/...)와 ID 기반 레거시 스트림(/file/video/:id,
/api/video/:id/file)은 그대로 유지(외부 공유 호환).

Co-Authored-By: Claude Opus 4 <noreply@anthropic.com>
2026-06-02 01:07:20 +09:00

35 lines
1.1 KiB
Plaintext

<!doctype html>
<html lang="ko">
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<title><%= video.title %> · 재생</title>
<link rel="stylesheet" href="/static/styles.css" />
</head>
<body class="siteBody">
<%
var folderPathEnc = breadcrumb.map(function (s) { return encodeURIComponent(s) }).join('/')
var folderHref = '/folder/' + folderPathEnc
var folderLabel = breadcrumb.join(' / ')
%>
<header class="publicNav">
<a class="navBrand" href="/">
<span class="navLogo">🎬</span>
<span class="navTitle">비디오 사이트</span>
</a>
<a class="secondaryButton" href="<%= folderHref %>">폴더로</a>
</header>
<main class="pageWrap">
<section class="hero">
<a class="muted" href="<%= folderHref %>">← <%= folderLabel %></a>
<h1><%= video.title %></h1>
</section>
<div class="standalonePlayer">
<video controls autoplay preload="metadata" src="/api/video/<%= folderPathEnc %>/<%= encodeURIComponent(video.id) %>"></video>
</div>
</main>
</body>
</html>