Hole abgelaufene Wiedergabeadressen im Player neu und melde einen Abbruch sichtbar
resources/js/player/renewal.js: erneuernder hls.js-Lader (je Abruf eine Wiederholung bei 403, höchstens 20 Erneuerungen, nach Ablehnung keine weitere). source.js bindet die Quelle (hls.js oder nativ in Safari, mit Wiederaufnahme an der Stelle) und zeigt bei endgültigem Fehler oder abgelehnter Erneuerung eine Meldung. Ohne data-hls-renew (Vorschau, Auswahl) bleibt das Verhalten wie bisher. Vitest als Entwicklungsabhängigkeit, 24 Tests der Logik. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
100b4e26c3
commit
345e694933
8 files changed
+981
-16
No files matched your search
+2
-12
@@ -7,6 +7,7 @@ import './hero-video.js';
|
||||
import './inquiry-form.js';
|
||||
import './inquiry-widget.js';
|
||||
import './member-nav.js';
|
||||
import { attachSource } from './player/source.js';
|
||||
|
||||
function attachPlayback(video) {
|
||||
if (!(video instanceof HTMLVideoElement) || video.dataset.playbackReady === '1') {
|
||||
@@ -20,18 +21,7 @@ function attachPlayback(video) {
|
||||
}
|
||||
|
||||
video.dataset.playbackReady = '1';
|
||||
|
||||
if (Hls.isSupported()) {
|
||||
const playback = new Hls();
|
||||
playback.loadSource(source);
|
||||
playback.attachMedia(video);
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
if (video.canPlayType('application/vnd.apple.mpegurl')) {
|
||||
video.src = source;
|
||||
}
|
||||
attachSource(video, { Hls, source, renewUrl: video.dataset.hlsRenew || null });
|
||||
}
|
||||
|
||||
function scanPlayback(root) {
|
||||
|
||||
Reference in new issue
Block a user