fix(shorts): orientation autoritaire, langues YouTube et autoplay fiable
CI / build-and-test (push) Successful in 14m18s
CI / build-and-test (push) Successful in 14m18s
- format: des que largeur/hauteur sont connues, l'orientation fait autorite (horizontale/carree => jamais short, meme <75 s). Repli duree reserve aux providers muets - dimensions mappees: Dailymotion (width,height), PeerTube (aspectRatio), Odysee (value.video.width/height) => validation verticale reelle - YouTube: langue via snippet.defaultAudioLanguage (filtre FR/EN) - autoplay: demarrage muet, suppression du deblocage automatique au scroll/selection (reload d'embed hors geste => ecran noir); son via le bouton dedie - PeerTube embed: muted=1 pour l'autoplay - server/search-filters.mjs: miroir de la regle d'orientation + tests mis a jour
This commit is contained in:
@@ -209,15 +209,21 @@ expect(
|
||||
!isShortItem({ title: 'clip carré', duration: 80, width: 1080, height: 1080, type: 'video' }),
|
||||
'square 80s is not a short (orientation alone is not enough)',
|
||||
);
|
||||
// …mais à 30 s, la règle 4 (durée seule) le garde : non-régression historique.
|
||||
// Dimensions connues non verticales ⇒ JAMAIS short, même à 30 s
|
||||
// (l'orientation fait autorité ; plus de repli durée quand w/h sont connus).
|
||||
expect(
|
||||
matchesFilters({ id: 'a', title: 'clip carré', duration: 30, width: 1080, height: 1080, type: 'video' }, { type: 'shorts' }),
|
||||
'square 30s still matches shorts via duration fallback',
|
||||
!matchesFilters({ id: 'a', title: 'clip carré', duration: 30, width: 1080, height: 1080, type: 'video' }, { type: 'shorts' }),
|
||||
'square 30s is not a short (orientation authoritative)',
|
||||
);
|
||||
// Règle 4 : horizontale 50 s ⇒ short (non-régression durée seule).
|
||||
// Horizontale 50 s ⇒ PAS short (dimensions connues, non verticale).
|
||||
expect(
|
||||
isShortItem({ title: 'paysage', duration: 50, width: 1280, height: 720, type: 'video' }),
|
||||
'horizontal 50s is a short (duration fallback)',
|
||||
!isShortItem({ title: 'paysage', duration: 50, width: 1280, height: 720, type: 'video' }),
|
||||
'horizontal 50s is not a short (orientation authoritative)',
|
||||
);
|
||||
// Repli durée seule réservé aux items SANS dimensions connues.
|
||||
expect(
|
||||
isShortItem({ title: 'courte sans dims', duration: 50, type: 'video' }),
|
||||
'50s without dimensions is a short (duration fallback)',
|
||||
);
|
||||
// Règle 3 : verticale SANS durée connue ⇒ PAS short.
|
||||
expect(
|
||||
|
||||
Reference in New Issue
Block a user