fix(twitch,rumble,shorts): replis serveur, embed Rumble autoritaire, refonte UX Shorts
CI / build-and-test (push) Successful in 14m15s

This commit is contained in:
2026-09-29 10:39:03 -04:00
parent 3fe05b3c30
commit f76a3795c2
6 changed files with 530 additions and 90 deletions
+18
View File
@@ -302,6 +302,24 @@ async function searchChannelsMulti(queries, first, auth, after = '') {
const handler = {
id: 'tw',
label: 'Twitch',
/**
* Top streams via le token serveur (retries inclus).
* Utilisé par la route /api/twitch/top-streams : repli fiable quand les
* appels Helix directs du navigateur échouent (proxy, CORS, 429...).
* @param {number} limit
*/
async topStreams(limit = 24) {
try {
const appToken = await getAppAccessToken();
const auth = { token: appToken.token, clientId: appToken.clientId };
const first = String(Math.min(100, Math.max(1, Number(limit) || 24)));
const data = await helixGet('/streams', new URLSearchParams({ first }), auth, { retries: 2 });
return Array.isArray(data?.data) ? data.data.map(mapStream) : [];
} catch (e) {
console.error('Twitch topStreams error:', e?.message || e);
return [];
}
},
/**
* Recherche mixte : lives + VODs + clips + chaînes.
* @param {string} q