@hyperframes/studio-server 0.9.18 → 0.9.20

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.
@@ -2,7 +2,7 @@ import {
2
2
  PROXY_STILL_EXTENSION,
3
3
  PROXY_VARIANT_CONFIG,
4
4
  ffmpegHasHdrFilters
5
- } from "./chunk-66YZA32N.js";
5
+ } from "./chunk-JBIB7WJP.js";
6
6
  import {
7
7
  probeFirstFrameColour,
8
8
  probeMediaMetadata
@@ -54,13 +54,20 @@ var BROWSER_HOSTILE_CODECS = {
54
54
  hevc: { representativeMime: 'video/mp4; codecs="hvc1.1.6.L120.B0"', prewarm: true },
55
55
  prores: { representativeMime: null, prewarm: true },
56
56
  theora: { representativeMime: 'video/ogg; codecs="theora"', prewarm: true },
57
+ mpeg4: { representativeMime: null, prewarm: true },
58
+ mjpeg: { representativeMime: null, prewarm: true },
59
+ mpeg2video: { representativeMime: null, prewarm: true },
60
+ dnxhd: { representativeMime: null, prewarm: true },
57
61
  // Every mainstream engine decodes AV1 and VP9, so canPlayType keeps the
58
62
  // original and only the rare browser that cannot pays for a transcode.
59
63
  av1: { representativeMime: 'video/mp4; codecs="av01.0.08M.08"', prewarm: false },
60
64
  vp9: { representativeMime: 'video/webm; codecs="vp09.00.10.08"', prewarm: false }
61
65
  };
66
+ var BROWSER_PLAYABLE_CODECS = /* @__PURE__ */ new Set(["h264", "vp8"]);
67
+ var UNLISTED_HOSTILE = { representativeMime: null, prewarm: true };
62
68
  function hostileCodecEntry(codecName) {
63
- return Object.hasOwn(BROWSER_HOSTILE_CODECS, codecName) ? BROWSER_HOSTILE_CODECS[codecName] : void 0;
69
+ if (Object.hasOwn(BROWSER_HOSTILE_CODECS, codecName)) return BROWSER_HOSTILE_CODECS[codecName];
70
+ return BROWSER_PLAYABLE_CODECS.has(codecName) ? void 0 : UNLISTED_HOSTILE;
64
71
  }
65
72
  function shouldPrewarmProxy(facts) {
66
73
  return hostileCodecEntry(facts.codecName)?.prewarm === true;
@@ -1,14 +1,14 @@
1
1
  import {
2
2
  PROXY_PARAMS_VERSION,
3
3
  resolveProxy
4
- } from "./chunk-F4AQECCT.js";
4
+ } from "./chunk-46USOJVM.js";
5
5
  import {
6
6
  createMediaCodecProbeCache,
7
7
  proxyVariantFor,
8
8
  recordProxyPrewarm,
9
9
  scanProjectMedia,
10
10
  shouldPrewarmProxy
11
- } from "./chunk-66YZA32N.js";
11
+ } from "./chunk-JBIB7WJP.js";
12
12
 
13
13
  // src/helpers/mediaProxyPreview.ts
14
14
  import { resolve } from "path";
@@ -51,8 +51,8 @@ interface BrowserHostileCodec {
51
51
  prewarm: boolean;
52
52
  }
53
53
  /**
54
- * Browser-hostile codec table v1. One exported constant so extending it is a
55
- * one-line change. `ffprobe` cannot emit exact RFC 6381 codec strings, so
54
+ * Browser-hostile codec table v1: the codecs with a known answer; one not here and not in
55
+ * `BROWSER_PLAYABLE_CODECS` is hostile too. `ffprobe` cannot emit exact RFC 6381 codec strings, so
56
56
  * these `representativeMime` values are deliberately coarse (a false
57
57
  * positive costs one proxy transcode, never correctness; a false negative is
58
58
  * rescued by the runtime's reactive zero-videoWidth swap).
@@ -15,7 +15,7 @@ import {
15
15
  scanProjectMedia,
16
16
  scanProjectMediaCodecMap,
17
17
  shouldPrewarmProxy
18
- } from "../chunk-66YZA32N.js";
18
+ } from "../chunk-JBIB7WJP.js";
19
19
  import "../chunk-Y6EZUBYR.js";
20
20
  import "../chunk-QF7MFJJU.js";
21
21
  import "../chunk-SVQFE44C.js";
@@ -4,9 +4,9 @@ import {
4
4
  isAutoProxyEnabled,
5
5
  proxyEtagSalt,
6
6
  resolvePreviewMediaCodecProbeCache
7
- } from "../chunk-IJMPYPJG.js";
8
- import "../chunk-F4AQECCT.js";
9
- import "../chunk-66YZA32N.js";
7
+ } from "../chunk-YN43WVB3.js";
8
+ import "../chunk-46USOJVM.js";
9
+ import "../chunk-JBIB7WJP.js";
10
10
  import "../chunk-Y6EZUBYR.js";
11
11
  import "../chunk-QF7MFJJU.js";
12
12
  import "../chunk-SVQFE44C.js";
@@ -22,8 +22,8 @@ import {
22
22
  retryProxyCopy,
23
23
  sourceFolderKind,
24
24
  waitForProxy
25
- } from "../chunk-F4AQECCT.js";
26
- import "../chunk-66YZA32N.js";
25
+ } from "../chunk-46USOJVM.js";
26
+ import "../chunk-JBIB7WJP.js";
27
27
  import "../chunk-Y6EZUBYR.js";
28
28
  import "../chunk-QF7MFJJU.js";
29
29
  import "../chunk-SVQFE44C.js";
package/dist/index.js CHANGED
@@ -91,7 +91,7 @@ import {
91
91
  isAutoProxyEnabled,
92
92
  proxyEtagSalt,
93
93
  resolvePreviewMediaCodecProbeCache
94
- } from "./chunk-IJMPYPJG.js";
94
+ } from "./chunk-YN43WVB3.js";
95
95
  import {
96
96
  CACHE_DIR_NAME,
97
97
  PROXY_PENDING_RETRY_AFTER_SECONDS,
@@ -105,7 +105,7 @@ import {
105
105
  resolveStill,
106
106
  retryProxyCopy,
107
107
  waitForProxy
108
- } from "./chunk-F4AQECCT.js";
108
+ } from "./chunk-46USOJVM.js";
109
109
  import {
110
110
  PROXY_VARIANT_CONFIG,
111
111
  decideMediaProxyEligibility,
@@ -113,7 +113,7 @@ import {
113
113
  probeAssetCodec,
114
114
  recordProxyRequest,
115
115
  resolveProxyVariantRequest
116
- } from "./chunk-66YZA32N.js";
116
+ } from "./chunk-JBIB7WJP.js";
117
117
  import {
118
118
  probeAudioTrack,
119
119
  probeMediaMetadata
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hyperframes/studio-server",
3
- "version": "0.9.18",
3
+ "version": "0.9.20",
4
4
  "repository": {
5
5
  "type": "git",
6
6
  "url": "https://github.com/heygen-com/hyperframes",
@@ -88,8 +88,8 @@
88
88
  "linkedom": "^0.18.12",
89
89
  "postcss": "^8.5.8",
90
90
  "postcss-selector-parser": "^7.1.2",
91
- "@hyperframes/parsers": "0.9.18",
92
- "@hyperframes/core": "0.9.18"
91
+ "@hyperframes/parsers": "0.9.20",
92
+ "@hyperframes/core": "0.9.20"
93
93
  },
94
94
  "devDependencies": {
95
95
  "@types/node": "^25.0.10",