@hyperframes/parsers 0.8.207 → 0.8.209

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.
@@ -0,0 +1,8 @@
1
+ interface FfprobeStreamCodec {
2
+ codec_type?: string;
3
+ codec_name?: string;
4
+ }
5
+ /** The audio track ffmpeg can decode, as N in `-map 0:a:N`; ffprobe names no codec for one it cannot. */
6
+ declare function decodableAudioStream(streams: readonly FfprobeStreamCodec[]): number | null;
7
+
8
+ export { type FfprobeStreamCodec, decodableAudioStream };
@@ -0,0 +1,8 @@
1
+ // src/mediaStreams.ts
2
+ function decodableAudioStream(streams) {
3
+ const index = streams.filter((stream) => stream.codec_type === "audio").findIndex((stream) => stream.codec_name !== void 0);
4
+ return index < 0 ? null : index;
5
+ }
6
+ export {
7
+ decodableAudioStream
8
+ };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hyperframes/parsers",
3
- "version": "0.8.207",
3
+ "version": "0.8.209",
4
4
  "repository": {
5
5
  "type": "git",
6
6
  "url": "https://github.com/heygen-com/hyperframes",
@@ -92,6 +92,10 @@
92
92
  "import": "./dist/mediaAlpha.js",
93
93
  "types": "./dist/mediaAlpha.d.ts"
94
94
  },
95
+ "./media-streams": {
96
+ "import": "./dist/mediaStreams.js",
97
+ "types": "./dist/mediaStreams.d.ts"
98
+ },
95
99
  "./asset-resolution": {
96
100
  "import": "./dist/assetResolution.js",
97
101
  "types": "./dist/assetResolution.d.ts"
@@ -135,7 +139,7 @@
135
139
  "tsx": "^4.21.0",
136
140
  "typescript": "^5.0.0",
137
141
  "vitest": "^4.1.11",
138
- "@hyperframes/core": "0.8.207"
142
+ "@hyperframes/core": "0.8.209"
139
143
  },
140
144
  "scripts": {
141
145
  "build": "tsup",