feat(rabbit): video oynatıcıya hata ayıklama logları ekle

This commit is contained in:
2025-12-20 00:25:48 +03:00
parent a9459cc4fe
commit b63bd41973

View File

@@ -42,6 +42,16 @@
.map((seg) => encodeURIComponent(seg.trim())); .map((seg) => encodeURIComponent(seg.trim()));
const relPath = segments.join("/"); const relPath = segments.join("/");
const url = `${API}/downloads/${safeFolder}/${relPath}`; const url = `${API}/downloads/${safeFolder}/${relPath}`;
// Debug: console'a URL yazdır
console.log("🎥 Video URL Debug:", {
folderId: item.folderId,
file: item.file,
safeFolder,
relPath,
finalUrl: withToken(url)
});
return withToken(url); return withToken(url);
} }
@@ -91,7 +101,18 @@
<button class="player-close" on:click={() => (showPlayer = false)}>Kapat</button> <button class="player-close" on:click={() => (showPlayer = false)}>Kapat</button>
<div class="player-title">{selected.title}</div> <div class="player-title">{selected.title}</div>
{#if videoUrl(selected)} {#if videoUrl(selected)}
<video controls autoplay src={videoUrl(selected)}></video> <video
controls
autoplay
src={videoUrl(selected)}
on:error={(e) => {
console.error("🎥 Video Error:", e.target.error);
console.log("🎥 Failed src:", videoUrl(selected));
}}
on:loadeddata={() => {
console.log("🎥 Video loaded successfully");
}}
></video>
{:else} {:else}
<div class="state error">Video yolu bulunamadı</div> <div class="state error">Video yolu bulunamadı</div>
{/if} {/if}