discovery-media-player 0.1.14 → 0.1.15
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/bin/serve.js +5 -1
- package/context/storage.js +11 -0
- package/docs/HOST-CONTRACT.md +3 -2
- package/package.json +1 -1
package/bin/serve.js
CHANGED
|
@@ -50,7 +50,11 @@ function versParametres(url) {
|
|
|
50
50
|
return q;
|
|
51
51
|
}
|
|
52
52
|
|
|
53
|
-
|
|
53
|
+
// ⚠️ DÉRIVÉE, PAS RECOPIÉE. Cette liste disait encore `.svg` après son retrait de la table des
|
|
54
|
+
// types en 0.1.7 : la page de premier contact proposait un format que la visionneuse ne sait plus
|
|
55
|
+
// ouvrir. Un clic, un téléchargement, et l'impression que le projet ne marche pas — sur l'écran
|
|
56
|
+
// qui ne se rejoue pas.
|
|
57
|
+
const AFFICHABLES = new Set(require("../context/storage").EXTENSIONS_AFFICHABLES);
|
|
54
58
|
|
|
55
59
|
/**
|
|
56
60
|
* Page d'accueil du mode dossier : ce qu'il y a à lire, et où le prendre.
|
package/context/storage.js
CHANGED
|
@@ -229,7 +229,18 @@ async function fetchAllowedFile(url, { range } = {}, { origins, hostBase, root,
|
|
|
229
229
|
return fetch(url, { headers });
|
|
230
230
|
}
|
|
231
231
|
|
|
232
|
+
/**
|
|
233
|
+
* Les extensions que le player sait AFFICHER — dérivées de la table ci-dessus, jamais recopiées.
|
|
234
|
+
*
|
|
235
|
+
* ⚠️ `bin/serve.js` en tenait une seconde liste pour sa page d'accueil, et elle contenait encore
|
|
236
|
+
* `.svg` après son retrait en 0.1.7. La page de PREMIER CONTACT proposait donc un format que la
|
|
237
|
+
* visionneuse ne sait plus ouvrir : on clique, et on reçoit un téléchargement. Deux listes du même
|
|
238
|
+
* fait finissent toujours par diverger — celle-ci se déduit.
|
|
239
|
+
*/
|
|
240
|
+
const EXTENSIONS_AFFICHABLES = Object.freeze(Object.keys(TYPES));
|
|
241
|
+
|
|
232
242
|
module.exports = {
|
|
243
|
+
EXTENSIONS_AFFICHABLES,
|
|
233
244
|
PUBLIC_OBJECT_PREFIX,
|
|
234
245
|
storageOrigins,
|
|
235
246
|
hostFetchBase,
|
package/docs/HOST-CONTRACT.md
CHANGED
|
@@ -25,11 +25,12 @@ need.
|
|
|
25
25
|
{
|
|
26
26
|
"product": "discovery-media-player",
|
|
27
27
|
"contract": 1,
|
|
28
|
-
"version": "
|
|
29
|
-
"capabilities": ["docshare", "presentations", "embed-denied", "host-fetch", "brand-reference", "host-auth", "host-share"],
|
|
28
|
+
"version": "<the running version>",
|
|
29
|
+
"capabilities": ["docshare", "presentations", "embed-denied", "host-fetch", "brand-reference", "host-auth", "host-share", "host-mail"],
|
|
30
30
|
"frameAncestors": ["'self'", "https://*.vercel.app", "https://app.example.com"],
|
|
31
31
|
"separateIssuer": true,
|
|
32
32
|
"hostShare": true,
|
|
33
|
+
"hostMail": true,
|
|
33
34
|
"plugins": { "bot": false, "visitors": false, "brandIntro": false, "botBrowser": false, "providerQuotas": false }
|
|
34
35
|
}
|
|
35
36
|
```
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "discovery-media-player",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.15",
|
|
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",
|