Compare commits

..

1 Commits

Author SHA1 Message Date
tkrmagid
dda09bdd3b v0.4.39: log per-anchor play source (CACHE vs LIVE STREAM)
All checks were successful
build / build (push) Successful in 1m23s
VideoPlayback.getOrStart now logs, for each anchor it starts, whether the
source resolved to the local cache file or a live network stream. This is
the single diagnostic that separates "cache miss -> fragile live stream"
from "cached but decode failed" when comparing a working host log against a
failing remote client's log — needed because the symptom is intermittent
(videos that fail before their preload finishes vs ones that play once
cached).

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-06-14 02:39:18 +09:00
2 changed files with 14 additions and 1 deletions

View File

@@ -5,7 +5,7 @@ org.gradle.configuration-cache=false
# Mod # Mod
mod_id=video_player mod_id=video_player
mod_version=0.4.38 mod_version=0.4.39
maven_group=com.ejclaw.videoplayer maven_group=com.ejclaw.videoplayer
archives_base_name=video_player archives_base_name=video_player

View File

@@ -68,6 +68,19 @@ public final class VideoPlayback {
String source = cached != null String source = cached != null
? cached.toAbsolutePath().toString() ? cached.toAbsolutePath().toString()
: VideoCache.encodeUrl(be.getUrl()); : VideoCache.encodeUrl(be.getUrl());
// Diagnostic: record, per anchor, whether this play resolved to the local cache file or
// fell back to a live network stream. A LIVE STREAM line on a video that doesn't show
// means a cache miss (download hadn't finished / failed) and the failure is on the
// network/decoder-open path; a CACHE line that still doesn't show means the local file
// decoded badly. This is the single fact that splits "cache problem" from "decode
// problem" when comparing two clients' logs.
if (cached != null) {
VideoPlayerMod.LOG.info("[{}] play {} at {} -> CACHE {}",
VideoPlayerMod.MOD_ID, be.getUrl(), pos.toShortString(), cached.getFileName());
} else {
VideoPlayerMod.LOG.info("[{}] play {} at {} -> LIVE STREAM (not cached yet)",
VideoPlayerMod.MOD_ID, be.getUrl(), pos.toShortString());
}
backend.play(source, be.isLoop()); backend.play(source, be.isLoop());
backend.setVolume(be.isMuted() ? 0F : be.getVolume()); backend.setVolume(be.isMuted() ? 0F : be.getVolume());