@remotion/media 4.0.388 → 4.0.390

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.
@@ -761,7 +761,7 @@ var videoIteratorManager = ({
761
761
  if (nonce.isStale()) {
762
762
  return;
763
763
  }
764
- startVideoIterator(newTime, nonce).catch(() => {});
764
+ await startVideoIterator(newTime, nonce);
765
765
  };
766
766
  return {
767
767
  startVideoIterator,
@@ -996,19 +996,21 @@ class MediaPlayer {
996
996
  if (currentPlaybackTime === newTime) {
997
997
  return;
998
998
  }
999
- await this.videoIteratorManager?.seek({
1000
- newTime,
1001
- nonce
1002
- });
1003
- await this.audioIteratorManager?.seek({
1004
- newTime,
1005
- nonce,
1006
- fps: this.fps,
1007
- playbackRate: this.playbackRate * this.globalPlaybackRate,
1008
- getIsPlaying: () => this.playing,
1009
- scheduleAudioNode: this.scheduleAudioNode,
1010
- bufferState: this.bufferState
1011
- });
999
+ await Promise.all([
1000
+ this.videoIteratorManager?.seek({
1001
+ newTime,
1002
+ nonce
1003
+ }),
1004
+ this.audioIteratorManager?.seek({
1005
+ newTime,
1006
+ nonce,
1007
+ fps: this.fps,
1008
+ playbackRate: this.playbackRate * this.globalPlaybackRate,
1009
+ getIsPlaying: () => this.playing,
1010
+ scheduleAudioNode: this.scheduleAudioNode,
1011
+ bufferState: this.bufferState
1012
+ })
1013
+ ]);
1012
1014
  }
1013
1015
  async play(time) {
1014
1016
  const newTime = getTimeInSeconds({
@@ -229,19 +229,21 @@ export class MediaPlayer {
229
229
  if (currentPlaybackTime === newTime) {
230
230
  return;
231
231
  }
232
- await this.videoIteratorManager?.seek({
233
- newTime,
234
- nonce,
235
- });
236
- await this.audioIteratorManager?.seek({
237
- newTime,
238
- nonce,
239
- fps: this.fps,
240
- playbackRate: this.playbackRate * this.globalPlaybackRate,
241
- getIsPlaying: () => this.playing,
242
- scheduleAudioNode: this.scheduleAudioNode,
243
- bufferState: this.bufferState,
244
- });
232
+ await Promise.all([
233
+ this.videoIteratorManager?.seek({
234
+ newTime,
235
+ nonce,
236
+ }),
237
+ this.audioIteratorManager?.seek({
238
+ newTime,
239
+ nonce,
240
+ fps: this.fps,
241
+ playbackRate: this.playbackRate * this.globalPlaybackRate,
242
+ getIsPlaying: () => this.playing,
243
+ scheduleAudioNode: this.scheduleAudioNode,
244
+ bufferState: this.bufferState,
245
+ }),
246
+ ]);
245
247
  }
246
248
  async play(time) {
247
249
  const newTime = getTimeInSeconds({
@@ -66,10 +66,7 @@ export const videoIteratorManager = ({ delayPlaybackHandleIfNotPremounting, canv
66
66
  if (nonce.isStale()) {
67
67
  return;
68
68
  }
69
- // Intentionally not awaited, letting audio start as well
70
- startVideoIterator(newTime, nonce).catch(() => {
71
- // Ignore errors, might be stale or disposed
72
- });
69
+ await startVideoIterator(newTime, nonce);
73
70
  };
74
71
  return {
75
72
  startVideoIterator,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@remotion/media",
3
- "version": "4.0.388",
3
+ "version": "4.0.390",
4
4
  "main": "dist/index.js",
5
5
  "types": "dist/index.d.ts",
6
6
  "module": "dist/esm/index.mjs",
@@ -22,14 +22,14 @@
22
22
  },
23
23
  "dependencies": {
24
24
  "mediabunny": "1.25.8",
25
- "remotion": "4.0.388"
25
+ "remotion": "4.0.390"
26
26
  },
27
27
  "peerDependencies": {
28
28
  "react": ">=16.8.0",
29
29
  "react-dom": ">=16.8.0"
30
30
  },
31
31
  "devDependencies": {
32
- "@remotion/eslint-config-internal": "4.0.388",
32
+ "@remotion/eslint-config-internal": "4.0.390",
33
33
  "@vitest/browser-webdriverio": "4.0.9",
34
34
  "eslint": "9.19.0",
35
35
  "react": "19.2.3",
@@ -1,6 +0,0 @@
1
- /**
2
- * Utility to check if error is network error
3
- * @param error
4
- * @returns
5
- */
6
- export declare function isNetworkError(error: Error): boolean;
@@ -1,17 +0,0 @@
1
- /**
2
- * Utility to check if error is network error
3
- * @param error
4
- * @returns
5
- */
6
- export function isNetworkError(error) {
7
- if (
8
- // Chrome
9
- error.message.includes('Failed to fetch') ||
10
- // Safari
11
- error.message.includes('Load failed') ||
12
- // Firefox
13
- error.message.includes('NetworkError when attempting to fetch resource')) {
14
- return true;
15
- }
16
- return false;
17
- }