diff --git a/src/components/watch/watch.component.ts b/src/components/watch/watch.component.ts index 65093f9..5e6039d 100644 --- a/src/components/watch/watch.component.ts +++ b/src/components/watch/watch.component.ts @@ -429,7 +429,10 @@ export class WatchComponent implements OnDestroy, AfterViewInit { // Clips : player dédié clips.twitch.tv (le player VOD rejette les slugs). const clipId = clip || (/^\d+$/.test(String(id || '')) ? null : ((this.video() as any)?.kind === 'clip' ? id : null)); if (clipId) { - const u = `https://clips.twitch.tv/embed?clip=${encodeURIComponent(clipId)}&${parentParams}&autoplay=false`; + // autoplay+muet, comme les autres fournisseurs de la page (YouTube + // mute=1, Dailymotion mute=1, Odysee muted=1) : le lecteur démarre + // tout seul, le son se réactive via les commandes du player. + const u = `https://clips.twitch.tv/embed?clip=${encodeURIComponent(clipId)}&${parentParams}&autoplay=true&muted=true`; return this.sanitizer.bypassSecurityTrustResourceUrl(u); } const base = 'https://player.twitch.tv/'; @@ -439,8 +442,8 @@ export class WatchComponent implements OnDestroy, AfterViewInit { // Les VOD acceptent time=1h2m3s (seek au chargement, ex. transcript). const timeParam = !chan && start > 0 ? `&time=${encodeURIComponent(this.formatTwitchTime(start))}` : ''; const qs = chan - ? `?channel=${encodeURIComponent(chan)}&${parentParams}&autoplay=false` - : `?video=${encodeURIComponent(id)}&${parentParams}&autoplay=false${timeParam}`; + ? `?channel=${encodeURIComponent(chan)}&${parentParams}&autoplay=true&muted=true` + : `?video=${encodeURIComponent(id)}&${parentParams}&autoplay=true&muted=true${timeParam}`; const u = base + qs; return this.sanitizer.bypassSecurityTrustResourceUrl(u); }