@remotion/promo-pages 4.0.453 → 4.0.454

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/dist/Homepage.js CHANGED
@@ -2043,7 +2043,7 @@ var getComponentsToAddStacksTo = () => componentsToAddStacksTo;
2043
2043
  var addSequenceStackTraces = (component) => {
2044
2044
  componentsToAddStacksTo.push(component);
2045
2045
  };
2046
- var VERSION = "4.0.453";
2046
+ var VERSION = "4.0.454";
2047
2047
  var checkMultipleRemotionVersions = () => {
2048
2048
  if (typeof globalThis === "undefined") {
2049
2049
  return;
@@ -29739,6 +29739,11 @@ var drawPreviewOverlay = ({
29739
29739
  context.fillText(lines2[i], boxLeft + boxPaddingX, boxTop + boxPaddingY + i * lineHeight);
29740
29740
  }
29741
29741
  };
29742
+ var getDurationOrCompute = async (input) => {
29743
+ return await input.getDurationFromMetadata(undefined, {
29744
+ skipLiveWait: true
29745
+ }) ?? input.computeDuration(undefined, { skipLiveWait: true });
29746
+ };
29742
29747
  function isNetworkError(error2) {
29743
29748
  if (error2.message.includes("Failed to fetch") || error2.message.includes("Load failed") || error2.message.includes("NetworkError when attempting to fetch resource")) {
29744
29749
  return true;
@@ -29977,7 +29982,7 @@ var createVideoIterator = async (timeToSeek, cache2) => {
29977
29982
  tryToSatisfySeek
29978
29983
  };
29979
29984
  };
29980
- var videoIteratorManager = ({
29985
+ var videoIteratorManager = async ({
29981
29986
  delayPlaybackHandleIfNotPremounting,
29982
29987
  canvas,
29983
29988
  context,
@@ -29994,9 +29999,11 @@ var videoIteratorManager = ({
29994
29999
  let framesRendered = 0;
29995
30000
  let currentDelayHandle = null;
29996
30001
  if (canvas) {
29997
- if (canvas.width !== videoTrack.displayWidth || canvas.height !== videoTrack.displayHeight) {
29998
- canvas.width = videoTrack.displayWidth;
29999
- canvas.height = videoTrack.displayHeight;
30002
+ const displayWidth = await videoTrack.getDisplayWidth();
30003
+ const displayHeight = await videoTrack.getDisplayHeight();
30004
+ if (canvas.width !== displayWidth || canvas.height !== displayHeight) {
30005
+ canvas.width = displayWidth;
30006
+ canvas.height = displayHeight;
30000
30007
  }
30001
30008
  }
30002
30009
  const canvasSink = new CanvasSink(videoTrack, {
@@ -30149,7 +30156,7 @@ class MediaPlayer {
30149
30156
  this.loop = loop;
30150
30157
  this.trimBefore = trimBefore;
30151
30158
  this.trimAfter = trimAfter;
30152
- this.audioStreamIndex = audioStreamIndex ?? 0;
30159
+ this.audioStreamIndex = audioStreamIndex;
30153
30160
  this.fps = fps;
30154
30161
  this.debugOverlay = debugOverlay;
30155
30162
  this.bufferState = bufferState;
@@ -30234,7 +30241,7 @@ class MediaPlayer {
30234
30241
  return { type: "unknown-container-format" };
30235
30242
  }
30236
30243
  const [durationInSeconds, videoTrack, audioTracks] = await Promise.all([
30237
- this.input.computeDuration(),
30244
+ getDurationOrCompute(this.input),
30238
30245
  this.input.getPrimaryVideoTrack(),
30239
30246
  this.input.getAudioTracks()
30240
30247
  ]);
@@ -30242,11 +30249,17 @@ class MediaPlayer {
30242
30249
  return { type: "disposed" };
30243
30250
  }
30244
30251
  this.totalDuration = durationInSeconds;
30245
- const audioTrack = audioTracks[this.audioStreamIndex] ?? null;
30252
+ const audioTrack = await (this.audioStreamIndex === null ? videoTrack?.getPrimaryPairableAudioTrack() : audioTracks[this.audioStreamIndex] ?? null);
30246
30253
  if (!videoTrack && !audioTrack) {
30247
30254
  return { type: "no-tracks" };
30248
30255
  }
30249
30256
  if (videoTrack && this.tagType === "video") {
30257
+ if (await videoTrack.isLive()) {
30258
+ throw new Error("Live streams are not currently supported by Remotion. Sorry! Source: " + this.src);
30259
+ }
30260
+ if (await videoTrack.isRelativeToUnixEpoch()) {
30261
+ throw new Error("Streams with UNIX timestamps are not currently supported by Remotion. Sorry! Source: " + this.src);
30262
+ }
30250
30263
  const canDecode = await videoTrack.canDecode();
30251
30264
  if (!canDecode) {
30252
30265
  return { type: "cannot-decode" };
@@ -30254,7 +30267,7 @@ class MediaPlayer {
30254
30267
  if (this.input.disposed) {
30255
30268
  return { type: "disposed" };
30256
30269
  }
30257
- this.videoIteratorManager = videoIteratorManager({
30270
+ this.videoIteratorManager = await videoIteratorManager({
30258
30271
  videoTrack,
30259
30272
  delayPlaybackHandleIfNotPremounting: this.delayPlaybackHandleIfNotPremounting,
30260
30273
  context: this.context,
@@ -30272,6 +30285,12 @@ class MediaPlayer {
30272
30285
  throw new Error(`should have asserted that the time is not null`);
30273
30286
  }
30274
30287
  if (audioTrack && this.sharedAudioContext) {
30288
+ if (await audioTrack.isLive()) {
30289
+ throw new Error("Live streams are not currently supported by Remotion. Sorry! Source: " + this.src);
30290
+ }
30291
+ if (await audioTrack.isRelativeToUnixEpoch()) {
30292
+ throw new Error("Streams with UNIX timestamps are not currently supported by Remotion. Sorry! Source: " + this.src);
30293
+ }
30275
30294
  const canDecode = await audioTrack.canDecode();
30276
30295
  if (!canDecode) {
30277
30296
  return { type: "cannot-decode" };
@@ -31052,7 +31071,7 @@ var AudioForPreviewAssertedShowing = ({
31052
31071
  fps: videoConfig.fps,
31053
31072
  canvas: null,
31054
31073
  playbackRate: initialPlaybackRate.current,
31055
- audioStreamIndex: audioStreamIndex ?? 0,
31074
+ audioStreamIndex: audioStreamIndex ?? null,
31056
31075
  debugOverlay: false,
31057
31076
  bufferState: buffer,
31058
31077
  isPostmounting: initialIsPostmounting.current,
@@ -31229,7 +31248,7 @@ var AudioForPreview2 = ({
31229
31248
  return null;
31230
31249
  }
31231
31250
  return /* @__PURE__ */ jsx57(AudioForPreviewAssertedShowing, {
31232
- audioStreamIndex: audioStreamIndex ?? 0,
31251
+ audioStreamIndex,
31233
31252
  src: preloadedSrc,
31234
31253
  playbackRate,
31235
31254
  logLevel: logLevel ?? defaultLogLevel,
@@ -32366,6 +32385,12 @@ var getSinks = async (src, credentials) => {
32366
32385
  if (!videoTrack) {
32367
32386
  return "no-video-track";
32368
32387
  }
32388
+ if (await videoTrack.isLive()) {
32389
+ throw new Error("Live streams are not currently supported by Remotion. Sorry! Source: " + src);
32390
+ }
32391
+ if (await videoTrack.isRelativeToUnixEpoch()) {
32392
+ throw new Error("Streams with UNIX timestamps are not currently supported by Remotion. Sorry! Source: " + src);
32393
+ }
32369
32394
  const canDecode = await videoTrack.canDecode();
32370
32395
  if (!canDecode) {
32371
32396
  return "cannot-decode";
@@ -32399,8 +32424,8 @@ var getSinks = async (src, credentials) => {
32399
32424
  if (format === "network-error") {
32400
32425
  return "network-error";
32401
32426
  }
32402
- const audioTracks = await input.getAudioTracks();
32403
- const audioTrack = audioTracks[index2];
32427
+ const videoTrack = await input.getPrimaryVideoTrack();
32428
+ const audioTrack = videoTrack === null ? (await input.getAudioTracks())[index2 ?? 0] : await (index2 === null ? videoTrack?.getPrimaryPairableAudioTrack() : (await input.getAudioTracks())[index2] ?? null);
32404
32429
  if (!audioTrack) {
32405
32430
  return "no-audio-track";
32406
32431
  }
@@ -32413,11 +32438,12 @@ var getSinks = async (src, credentials) => {
32413
32438
  };
32414
32439
  };
32415
32440
  const getAudioSinksPromise = (index2) => {
32416
- if (audioSinksPromise[index2]) {
32417
- return audioSinksPromise[index2];
32441
+ const keyIndex = index2 === null ? -1 : index2;
32442
+ if (audioSinksPromise[keyIndex]) {
32443
+ return audioSinksPromise[keyIndex];
32418
32444
  }
32419
- audioSinksPromise[index2] = getAudioSinks(index2);
32420
- return audioSinksPromise[index2];
32445
+ audioSinksPromise[keyIndex] = getAudioSinks(index2);
32446
+ return audioSinksPromise[keyIndex];
32421
32447
  };
32422
32448
  return {
32423
32449
  getVideo: () => getVideoSinksPromise(),
@@ -32425,7 +32451,7 @@ var getSinks = async (src, credentials) => {
32425
32451
  actualMatroskaTimestamps: rememberActualMatroskaTimestamps(isMatroska),
32426
32452
  isMatroska,
32427
32453
  getDuration: () => {
32428
- return input.computeDuration();
32454
+ return getDurationOrCompute(input);
32429
32455
  }
32430
32456
  };
32431
32457
  };
@@ -33103,7 +33129,7 @@ var AudioForRendering2 = ({
33103
33129
  includeVideo: false,
33104
33130
  isClientSideRendering: environment.isClientSideRendering,
33105
33131
  loop: loop ?? false,
33106
- audioStreamIndex: audioStreamIndex ?? 0,
33132
+ audioStreamIndex: audioStreamIndex ?? null,
33107
33133
  trimAfter,
33108
33134
  trimBefore,
33109
33135
  fps,
@@ -35535,7 +35561,7 @@ import {
35535
35561
  import { BufferTarget, StreamTarget } from "mediabunny";
35536
35562
 
35537
35563
  // ../core/dist/esm/version.mjs
35538
- var VERSION2 = "4.0.453";
35564
+ var VERSION2 = "4.0.454";
35539
35565
 
35540
35566
  // ../web-renderer/dist/esm/index.mjs
35541
35567
  import { AudioSample, VideoSample } from "mediabunny";
package/dist/design.js CHANGED
@@ -6993,7 +6993,7 @@ var getComponentsToAddStacksTo = () => componentsToAddStacksTo;
6993
6993
  var addSequenceStackTraces = (component) => {
6994
6994
  componentsToAddStacksTo.push(component);
6995
6995
  };
6996
- var VERSION = "4.0.453";
6996
+ var VERSION = "4.0.454";
6997
6997
  var checkMultipleRemotionVersions = () => {
6998
6998
  if (typeof globalThis === "undefined") {
6999
6999
  return;
package/dist/experts.js CHANGED
@@ -2043,7 +2043,7 @@ var getComponentsToAddStacksTo = () => componentsToAddStacksTo;
2043
2043
  var addSequenceStackTraces = (component) => {
2044
2044
  componentsToAddStacksTo.push(component);
2045
2045
  };
2046
- var VERSION = "4.0.453";
2046
+ var VERSION = "4.0.454";
2047
2047
  var checkMultipleRemotionVersions = () => {
2048
2048
  if (typeof globalThis === "undefined") {
2049
2049
  return;
@@ -6993,7 +6993,7 @@ var getComponentsToAddStacksTo = () => componentsToAddStacksTo;
6993
6993
  var addSequenceStackTraces = (component) => {
6994
6994
  componentsToAddStacksTo.push(component);
6995
6995
  };
6996
- var VERSION = "4.0.453";
6996
+ var VERSION = "4.0.454";
6997
6997
  var checkMultipleRemotionVersions = () => {
6998
6998
  if (typeof globalThis === "undefined") {
6999
6999
  return;
@@ -6993,7 +6993,7 @@ var getComponentsToAddStacksTo = () => componentsToAddStacksTo;
6993
6993
  var addSequenceStackTraces = (component) => {
6994
6994
  componentsToAddStacksTo.push(component);
6995
6995
  };
6996
- var VERSION = "4.0.453";
6996
+ var VERSION = "4.0.454";
6997
6997
  var checkMultipleRemotionVersions = () => {
6998
6998
  if (typeof globalThis === "undefined") {
6999
6999
  return;
@@ -24327,7 +24327,7 @@ var getComponentsToAddStacksTo = () => componentsToAddStacksTo;
24327
24327
  var addSequenceStackTraces = (component) => {
24328
24328
  componentsToAddStacksTo.push(component);
24329
24329
  };
24330
- var VERSION = "4.0.453";
24330
+ var VERSION = "4.0.454";
24331
24331
  var checkMultipleRemotionVersions = () => {
24332
24332
  if (typeof globalThis === "undefined") {
24333
24333
  return;
@@ -24327,7 +24327,7 @@ var getComponentsToAddStacksTo = () => componentsToAddStacksTo;
24327
24327
  var addSequenceStackTraces = (component) => {
24328
24328
  componentsToAddStacksTo.push(component);
24329
24329
  };
24330
- var VERSION = "4.0.453";
24330
+ var VERSION = "4.0.454";
24331
24331
  var checkMultipleRemotionVersions = () => {
24332
24332
  if (typeof globalThis === "undefined") {
24333
24333
  return;
package/dist/team.js CHANGED
@@ -7174,7 +7174,7 @@ var getComponentsToAddStacksTo = () => componentsToAddStacksTo;
7174
7174
  var addSequenceStackTraces = (component) => {
7175
7175
  componentsToAddStacksTo.push(component);
7176
7176
  };
7177
- var VERSION = "4.0.453";
7177
+ var VERSION = "4.0.454";
7178
7178
  var checkMultipleRemotionVersions = () => {
7179
7179
  if (typeof globalThis === "undefined") {
7180
7180
  return;
@@ -6993,7 +6993,7 @@ var getComponentsToAddStacksTo = () => componentsToAddStacksTo;
6993
6993
  var addSequenceStackTraces = (component) => {
6994
6994
  componentsToAddStacksTo.push(component);
6995
6995
  };
6996
- var VERSION = "4.0.453";
6996
+ var VERSION = "4.0.454";
6997
6997
  var checkMultipleRemotionVersions = () => {
6998
6998
  if (typeof globalThis === "undefined") {
6999
6999
  return;
package/dist/templates.js CHANGED
@@ -6993,7 +6993,7 @@ var getComponentsToAddStacksTo = () => componentsToAddStacksTo;
6993
6993
  var addSequenceStackTraces = (component) => {
6994
6994
  componentsToAddStacksTo.push(component);
6995
6995
  };
6996
- var VERSION = "4.0.453";
6996
+ var VERSION = "4.0.454";
6997
6997
  var checkMultipleRemotionVersions = () => {
6998
6998
  if (typeof globalThis === "undefined") {
6999
6999
  return;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@remotion/promo-pages",
3
- "version": "4.0.453",
3
+ "version": "4.0.454",
4
4
  "publishConfig": {
5
5
  "access": "public"
6
6
  },
@@ -11,30 +11,30 @@
11
11
  },
12
12
  "type": "module",
13
13
  "dependencies": {
14
- "@remotion/animated-emoji": "4.0.453",
15
- "@remotion/design": "4.0.453",
16
- "@remotion/web-renderer": "4.0.453",
17
- "@remotion/lottie": "4.0.453",
18
- "@remotion/paths": "4.0.453",
19
- "@remotion/player": "4.0.453",
20
- "@remotion/shapes": "4.0.453",
21
- "@remotion/media": "4.0.453",
22
- "@remotion/svg-3d-engine": "4.0.453",
23
- "create-video": "4.0.453",
14
+ "@remotion/animated-emoji": "4.0.454",
15
+ "@remotion/design": "4.0.454",
16
+ "@remotion/web-renderer": "4.0.454",
17
+ "@remotion/lottie": "4.0.454",
18
+ "@remotion/paths": "4.0.454",
19
+ "@remotion/player": "4.0.454",
20
+ "@remotion/shapes": "4.0.454",
21
+ "@remotion/media": "4.0.454",
22
+ "@remotion/svg-3d-engine": "4.0.454",
23
+ "create-video": "4.0.454",
24
24
  "hls.js": "1.5.19",
25
25
  "polished": "4.3.1",
26
- "remotion": "4.0.453",
26
+ "remotion": "4.0.454",
27
27
  "zod": "4.3.6",
28
28
  "@mux/upchunk": "^3.5.0",
29
29
  "@vidstack/react": "1.12.13",
30
30
  "bun-plugin-tailwind": "0.1.2",
31
- "@mediabunny/ac3": "1.39.2",
32
- "@mediabunny/aac-encoder": "1.39.2",
33
- "@mediabunny/flac-encoder": "1.39.2",
34
- "@mediabunny/mp3-encoder": "1.39.2"
31
+ "@mediabunny/ac3": "1.42.0",
32
+ "@mediabunny/aac-encoder": "1.42.0",
33
+ "@mediabunny/flac-encoder": "1.42.0",
34
+ "@mediabunny/mp3-encoder": "1.42.0"
35
35
  },
36
36
  "devDependencies": {
37
- "@remotion/eslint-config-internal": "4.0.453",
37
+ "@remotion/eslint-config-internal": "4.0.454",
38
38
  "@eslint/eslintrc": "3.1.0",
39
39
  "@types/react": "19.2.7",
40
40
  "@types/react-dom": "19.2.3",