fix(dailymotion): Player ID obligatoire dans l'URL d'embed
CI / build-and-test (push) Successful in 14m58s

Dailymotion exige désormais un Player ID (fév. 2026) : player.html?video=...
sans Player ID répond HTTP 403 'Forbidden'. L'URL correcte est
geo.dailymotion.com/player/{PLAYER_ID}.html?video=...

- helper dailymotionPlayerId()/dailymotionEmbedBase() (config window.DAILYMOTION_PLAYER_ID, repli demo x8lr5)
- /watch et /shorts utilisent le nouvel endpoint avec Player ID
- config.local.example.js documente la config
This commit is contained in:
2026-09-30 21:48:06 -04:00
parent c391be80e5
commit 2bcc7321aa
4 changed files with 49 additions and 15 deletions
+5 -11
View File
@@ -15,6 +15,7 @@ import { AuthService } from '../../services/auth.service';
import { Video } from '../../models/video.model';
import { shortsFeedAccepts, isPlayable as isPlayablePolicy, type PlayableContext } from '../../app/shared/utils/section-policy';
import { SHORT_TO_LONG, type ProviderId } from '../../app/shared/providers/provider-ids';
import { dailymotionEmbedBase } from '../../app/shared/providers/dailymotion-player';
import { SearchService } from '../../app/search/search.service';
import { ChannelProviderFactory } from '../../app/core/providers/channel/channel-provider.factory';
import {
@@ -375,18 +376,11 @@ export class WatchShortComponent implements OnDestroy {
return this.sanitizer.bypassSecurityTrustResourceUrl(u);
}
if (p === 'dailymotion' && v.videoId) {
// Nouveau player obligatoire depuis fév. 2026 (l'ancien /embed est
// coupé et répond "Forbidden"). Seuls mute/startTime/loop passent
// en query sans Player ID ; autoplay est tenté au mieux.
// Correctif bug "Forbidden" systématique en Shorts alors que /watch
// (toujours muet) joue la même vidéo : on démarre MUET comme /watch
// (même URL, mute=1) et on ne passe au son QUE sur action explicite
// du bouton Son — le clic EST le geste qui autorise le son (même
// motif que le player Odysee, cf. soundTouched). L'autoplay sonore
// sans geste préalable est bloqué et le player par défaut l'affiche
// comme "Forbidden".
// Nouveau player + Player ID obligatoire depuis fév. 2026 (player.html
// sans Player ID répond "Forbidden"). Démarrage MUET (comme /watch),
// son uniquement sur action explicite du bouton Son.
const withSound = !this.muted() && this.soundTouched();
const u = `https://geo.dailymotion.com/player.html?video=${encodeURIComponent(v.videoId)}&mute=${withSound ? 0 : 1}&autoplay=1`;
const u = `${dailymotionEmbedBase(v.videoId)}&mute=${withSound ? 0 : 1}&autoplay=1`;
return this.sanitizer.bypassSecurityTrustResourceUrl(u);
}
if (p === 'twitch' && v.videoId) {