feat(rabbit): video oynatıcıya hata ayıklama logları ekle
This commit is contained in:
@@ -42,6 +42,16 @@
|
||||
.map((seg) => encodeURIComponent(seg.trim()));
|
||||
const relPath = segments.join("/");
|
||||
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);
|
||||
}
|
||||
|
||||
@@ -91,7 +101,18 @@
|
||||
<button class="player-close" on:click={() => (showPlayer = false)}>Kapat</button>
|
||||
<div class="player-title">{selected.title}</div>
|
||||
{#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}
|
||||
<div class="state error">Video yolu bulunamadı</div>
|
||||
{/if}
|
||||
|
||||
Reference in New Issue
Block a user