@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.
- package/dist/esm/index.mjs +16 -14
- package/dist/media-player.js +15 -13
- package/dist/video-iterator-manager.js +1 -4
- package/package.json +3 -3
- package/dist/is-network-error.d.ts +0 -6
- package/dist/is-network-error.js +0 -17
package/dist/esm/index.mjs
CHANGED
|
@@ -761,7 +761,7 @@ var videoIteratorManager = ({
|
|
|
761
761
|
if (nonce.isStale()) {
|
|
762
762
|
return;
|
|
763
763
|
}
|
|
764
|
-
startVideoIterator(newTime, nonce)
|
|
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
|
|
1000
|
-
|
|
1001
|
-
|
|
1002
|
-
|
|
1003
|
-
|
|
1004
|
-
|
|
1005
|
-
|
|
1006
|
-
|
|
1007
|
-
|
|
1008
|
-
|
|
1009
|
-
|
|
1010
|
-
|
|
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({
|
package/dist/media-player.js
CHANGED
|
@@ -229,19 +229,21 @@ export class MediaPlayer {
|
|
|
229
229
|
if (currentPlaybackTime === newTime) {
|
|
230
230
|
return;
|
|
231
231
|
}
|
|
232
|
-
await
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
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
|
-
|
|
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.
|
|
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.
|
|
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.
|
|
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",
|
package/dist/is-network-error.js
DELETED
|
@@ -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
|
-
}
|