@remotion/webcodecs 4.0.269 → 4.0.271

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.
@@ -35,7 +35,7 @@ export type ConvertMediaOnAudioData = (options: {
35
35
  audioData: AudioData;
36
36
  track: AudioTrack;
37
37
  }) => Promise<AudioData> | AudioData;
38
- export declare const convertMedia: <F extends Options<ParseMediaFields>>({ src, onVideoFrame, onAudioData, onProgress: onProgressDoNotCallDirectly, audioCodec, container, videoCodec, controller, onAudioTrack: userAudioResolver, onVideoTrack: userVideoResolver, reader, fields, logLevel, writer, progressIntervalInMs, rotate, apiKey, resize, onAudioCodec, onContainer, onDimensions, onDurationInSeconds, onFps, onImages, onInternalStats, onIsHdr, onKeyframes, onLocation, onMetadata, onMimeType, onName, onNumberOfAudioChannels, onRotation, onSampleRate, onSize, onSlowAudioBitrate, onSlowDurationInSeconds, onSlowFps, onSlowKeyframes, onSlowNumberOfFrames, onSlowVideoBitrate, onStructure, onTracks, onUnrotatedDimensions, onVideoCodec, onM3uStreams, selectM3uStream, ...more }: {
38
+ export declare const convertMedia: <F extends Options<ParseMediaFields>>({ src, onVideoFrame, onAudioData, onProgress: onProgressDoNotCallDirectly, audioCodec, container, videoCodec, controller, onAudioTrack: userAudioResolver, onVideoTrack: userVideoResolver, reader, fields, logLevel, writer, progressIntervalInMs, rotate, apiKey, resize, onAudioCodec, onContainer, onDimensions, onDurationInSeconds, onFps, onImages, onInternalStats, onIsHdr, onKeyframes, onLocation, onMetadata, onMimeType, onName, onNumberOfAudioChannels, onRotation, onSampleRate, onSize, onSlowAudioBitrate, onSlowDurationInSeconds, onSlowFps, onSlowKeyframes, onSlowNumberOfFrames, onSlowVideoBitrate, onStructure, onTracks, onUnrotatedDimensions, onVideoCodec, onM3uStreams, selectM3uStream, selectM3uAssociatedPlaylists, ...more }: {
39
39
  src: ParseMediaOptions<F>["src"];
40
40
  container: ConvertMediaContainer;
41
41
  onVideoFrame?: ConvertMediaOnVideoFrame;
@@ -47,6 +47,7 @@ export declare const convertMedia: <F extends Options<ParseMediaFields>>({ src,
47
47
  onAudioTrack?: ConvertMediaOnAudioTrackHandler;
48
48
  onVideoTrack?: ConvertMediaOnVideoTrackHandler;
49
49
  selectM3uStream?: ParseMediaOptions<F>["selectM3uStream"];
50
+ selectM3uAssociatedPlaylists?: ParseMediaOptions<F>["selectM3uAssociatedPlaylists"];
50
51
  reader?: ParseMediaOptions<F>["reader"];
51
52
  logLevel?: LogLevel;
52
53
  writer?: WriterInterface;
@@ -6,7 +6,7 @@
6
6
  Object.defineProperty(exports, "__esModule", { value: true });
7
7
  exports.convertMedia = void 0;
8
8
  const media_parser_1 = require("@remotion/media-parser");
9
- const fetch_1 = require("@remotion/media-parser/fetch");
9
+ const web_1 = require("@remotion/media-parser/web");
10
10
  const auto_select_writer_1 = require("./auto-select-writer");
11
11
  const calculate_progress_1 = require("./calculate-progress");
12
12
  const progress_tracker_1 = require("./create/progress-tracker");
@@ -21,7 +21,7 @@ const select_container_creator_1 = require("./select-container-creator");
21
21
  const send_telemetry_event_1 = require("./send-telemetry-event");
22
22
  const throttled_state_update_1 = require("./throttled-state-update");
23
23
  const webcodecs_controller_1 = require("./webcodecs-controller");
24
- const convertMedia = async function ({ src, onVideoFrame, onAudioData, onProgress: onProgressDoNotCallDirectly, audioCodec, container, videoCodec, controller = (0, webcodecs_controller_1.webcodecsController)(), onAudioTrack: userAudioResolver, onVideoTrack: userVideoResolver, reader, fields, logLevel = 'info', writer, progressIntervalInMs, rotate, apiKey, resize, onAudioCodec, onContainer, onDimensions, onDurationInSeconds, onFps, onImages, onInternalStats, onIsHdr, onKeyframes, onLocation, onMetadata, onMimeType, onName, onNumberOfAudioChannels, onRotation, onSampleRate, onSize, onSlowAudioBitrate, onSlowDurationInSeconds, onSlowFps, onSlowKeyframes, onSlowNumberOfFrames, onSlowVideoBitrate, onStructure, onTracks, onUnrotatedDimensions, onVideoCodec, onM3uStreams, selectM3uStream, ...more }) {
24
+ const convertMedia = async function ({ src, onVideoFrame, onAudioData, onProgress: onProgressDoNotCallDirectly, audioCodec, container, videoCodec, controller = (0, webcodecs_controller_1.webcodecsController)(), onAudioTrack: userAudioResolver, onVideoTrack: userVideoResolver, reader, fields, logLevel = 'info', writer, progressIntervalInMs, rotate, apiKey, resize, onAudioCodec, onContainer, onDimensions, onDurationInSeconds, onFps, onImages, onInternalStats, onIsHdr, onKeyframes, onLocation, onMetadata, onMimeType, onName, onNumberOfAudioChannels, onRotation, onSampleRate, onSize, onSlowAudioBitrate, onSlowDurationInSeconds, onSlowFps, onSlowKeyframes, onSlowNumberOfFrames, onSlowVideoBitrate, onStructure, onTracks, onUnrotatedDimensions, onVideoCodec, onM3uStreams, selectM3uStream, selectM3uAssociatedPlaylists, ...more }) {
25
25
  var _a, _b;
26
26
  if (controller._internals.signal.aborted) {
27
27
  return Promise.reject(new media_parser_1.MediaParserAbortError('Aborted'));
@@ -117,7 +117,7 @@ const convertMedia = async function ({ src, onVideoFrame, onAudioData, onProgres
117
117
  ...fields,
118
118
  durationInSeconds: true,
119
119
  },
120
- reader: reader !== null && reader !== void 0 ? reader : fetch_1.fetchReader,
120
+ reader: reader !== null && reader !== void 0 ? reader : web_1.webReader,
121
121
  ...more,
122
122
  onDurationInSeconds: (durationInSeconds) => {
123
123
  var _a;
@@ -175,6 +175,8 @@ const convertMedia = async function ({ src, onVideoFrame, onAudioData, onProgres
175
175
  apiName: 'convertMedia()',
176
176
  onM3uStreams: onM3uStreams !== null && onM3uStreams !== void 0 ? onM3uStreams : null,
177
177
  selectM3uStream: selectM3uStream !== null && selectM3uStream !== void 0 ? selectM3uStream : media_parser_1.defaultSelectM3uStreamFn,
178
+ selectM3uAssociatedPlaylists: selectM3uAssociatedPlaylists !== null && selectM3uAssociatedPlaylists !== void 0 ? selectM3uAssociatedPlaylists : media_parser_1.defaultSelectM3uAssociatedPlaylists,
179
+ mp4HeaderSegment: null,
178
180
  })
179
181
  .then(() => {
180
182
  return state.waitForFinish();
@@ -1429,11 +1429,12 @@ var canReencodeVideoTrack = async ({
1429
1429
  };
1430
1430
  // src/convert-media.ts
1431
1431
  import {
1432
+ defaultSelectM3uAssociatedPlaylists,
1432
1433
  defaultSelectM3uStreamFn,
1433
1434
  MediaParserAbortError as MediaParserAbortError3,
1434
1435
  MediaParserInternals as MediaParserInternals9
1435
1436
  } from "@remotion/media-parser";
1436
- import { fetchReader } from "@remotion/media-parser/fetch";
1437
+ import { webReader } from "@remotion/media-parser/web";
1437
1438
 
1438
1439
  // src/auto-select-writer.ts
1439
1440
  var autoSelectWriter = async (writer, logLevel) => {
@@ -4869,6 +4870,7 @@ var convertMedia = async function({
4869
4870
  onVideoCodec,
4870
4871
  onM3uStreams,
4871
4872
  selectM3uStream,
4873
+ selectM3uAssociatedPlaylists,
4872
4874
  ...more
4873
4875
  }) {
4874
4876
  if (controller._internals.signal.aborted) {
@@ -4963,7 +4965,7 @@ var convertMedia = async function({
4963
4965
  ...fields,
4964
4966
  durationInSeconds: true
4965
4967
  },
4966
- reader: reader ?? fetchReader,
4968
+ reader: reader ?? webReader,
4967
4969
  ...more,
4968
4970
  onDurationInSeconds: (durationInSeconds) => {
4969
4971
  if (durationInSeconds === null) {
@@ -5019,7 +5021,9 @@ var convertMedia = async function({
5019
5021
  onVideoCodec: onVideoCodec ?? null,
5020
5022
  apiName: "convertMedia()",
5021
5023
  onM3uStreams: onM3uStreams ?? null,
5022
- selectM3uStream: selectM3uStream ?? defaultSelectM3uStreamFn
5024
+ selectM3uStream: selectM3uStream ?? defaultSelectM3uStreamFn,
5025
+ selectM3uAssociatedPlaylists: selectM3uAssociatedPlaylists ?? defaultSelectM3uAssociatedPlaylists,
5026
+ mp4HeaderSegment: null
5023
5027
  }).then(() => {
5024
5028
  return state.waitForFinish();
5025
5029
  }).then(() => {
@@ -1,2 +1,3 @@
1
+ import type { ParseMediaSrc } from '@remotion/media-parser';
1
2
  import type { ConvertMediaContainer } from './get-available-containers';
2
- export declare const generateOutputFilename: (source: string | Blob, container: ConvertMediaContainer) => string;
3
+ export declare const generateOutputFilename: (source: ParseMediaSrc, container: ConvertMediaContainer) => string;
package/dist/index.d.ts CHANGED
@@ -40,6 +40,6 @@ export declare const WebCodecsInternals: {
40
40
  height: number;
41
41
  rotation: number;
42
42
  resizeOperation: import("./resizing/mode").ResizeOperation | null;
43
- videoCodec: import("./get-available-video-codecs").ConvertMediaVideoCodec | import("@remotion/media-parser").MediaParserVideoCodec;
43
+ videoCodec: import("./get-available-video-codecs").ConvertMediaVideoCodec | import("@remotion/media-parser/src").MediaParserVideoCodec;
44
44
  }) => import("./resizing/mode").Dimensions;
45
45
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@remotion/webcodecs",
3
- "version": "4.0.269",
3
+ "version": "4.0.271",
4
4
  "main": "dist/index.js",
5
5
  "types": "dist/index.d.ts",
6
6
  "module": "dist/esm/index.mjs",
@@ -17,15 +17,15 @@
17
17
  "author": "Jonny Burger <jonny@remotion.dev>",
18
18
  "license": "Remotion License (See https://remotion.dev/docs/webcodecs#license)",
19
19
  "dependencies": {
20
- "@remotion/media-parser": "4.0.269",
21
- "@remotion/licensing": "4.0.269"
20
+ "@remotion/media-parser": "4.0.271",
21
+ "@remotion/licensing": "4.0.271"
22
22
  },
23
23
  "peerDependencies": {},
24
24
  "devDependencies": {
25
25
  "@types/dom-webcodecs": "0.1.11",
26
26
  "eslint": "9.19.0",
27
- "@remotion/example-videos": "4.0.269",
28
- "@remotion/eslint-config-internal": "4.0.269"
27
+ "@remotion/example-videos": "4.0.271",
28
+ "@remotion/eslint-config-internal": "4.0.271"
29
29
  },
30
30
  "keywords": [],
31
31
  "publishConfig": {