discovery-media-player 0.1.46 → 0.1.47
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/server/handler.js +12 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "discovery-media-player",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.47",
|
|
4
4
|
"description": "Self-hosted document viewer: per-recipient tracked links, reading analytics, live presentation. The core knows nothing about the application hosting it — everything it borrows arrives through an injected context.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"pdf-viewer",
|
package/server/handler.js
CHANGED
|
@@ -3614,7 +3614,18 @@ async function handler(req, res) {
|
|
|
3614
3614
|
}
|
|
3615
3615
|
const supaUrl = (PLAYER.config && PLAYER.config.supabaseUrl) || "";
|
|
3616
3616
|
const supaKey = (PLAYER.config && PLAYER.config.supabasePublishableKey) || "";
|
|
3617
|
-
const pseudo = { preview: true, embed, slug: "", file_name: String(q.name || "document.pdf"), doc_title: String(q.title || q.name || "Document"), raw_url: url, doc_id: String(q.docId || ""), presenter_name: String(q.by || ""), presenter_avatar: String(q.av || ""), internal_email: String(q.uemail || ""), internal_token: String(q.it || ""), supa_url: supaUrl, supa_key: supaKey, auto_present: String(q.autopresent || "") === "1", resume_slug: String(q.resume || ""), stream_url: `/api/doc?preview=1&stream=1&url=${encodeURIComponent(url)}&name=${encodeURIComponent(String(q.name || ""))}` };
|
|
3617
|
+
const pseudo = { preview: true, embed, slug: "", file_name: String(q.name || "document.pdf"), doc_title: String(q.title || q.name || "Document"), raw_url: url, doc_id: String(q.docId || ""), presenter_name: String(q.by || ""), presenter_avatar: String(q.av || ""), internal_email: String(q.uemail || ""), internal_token: String(q.it || ""), supa_url: supaUrl, supa_key: supaKey, auto_present: String(q.autopresent || "") === "1", resume_slug: String(q.resume || ""), brand_key: String(q.brand || "") || null, stream_url: `/api/doc?preview=1&stream=1&url=${encodeURIComponent(url)}&name=${encodeURIComponent(String(q.name || ""))}` };
|
|
3618
|
+
// ⚠️ LA MARQUE MANQUAIT ICI, ET SEULEMENT ICI. Toute la machinerie existe — l'hôte répond à
|
|
3619
|
+
// `PLAYER_HOST_BRAND_URL`, `branding.forKey` résout, les liens tracés affichent la bonne
|
|
3620
|
+
// marque. Ce chemin-ci ne l'appelait simplement pas, et aucun paramètre ne transportait la
|
|
3621
|
+
// clé. Un hôte à plusieurs marques servait donc, sur le domaine d'un client, le loader d'un
|
|
3622
|
+
// autre — le visiteur voyant l'enseigne d'une entreprise qu'il ne connaît pas.
|
|
3623
|
+
//
|
|
3624
|
+
// Signalé par le second hôte, sur une notice ouverte chez son client.
|
|
3625
|
+
try {
|
|
3626
|
+
const marque = await brands.brandForShare(pseudo);
|
|
3627
|
+
if (marque) { pseudo.brand_logo = marque.logo; pseudo.brand_name = marque.name; pseudo.brand_dark = marque.dark; }
|
|
3628
|
+
} catch { /* le loader dégrade, il n'empêche pas de lire */ }
|
|
3618
3629
|
let plogo = ""; try { plogo = await PLAYER.branding.logo(); } catch { /* sans logo */ }
|
|
3619
3630
|
const pnonce = crypto.randomBytes(16).toString("base64");
|
|
3620
3631
|
// Aperçu interne : CSP relâchée (supabase-js jsdelivr + Realtime wss) pour la présence + le chat live,
|