remotion 4.0.70 → 4.0.72

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.
Files changed (36) hide show
  1. package/dist/cjs/audio/Audio.d.ts +2 -1
  2. package/dist/cjs/audio/Audio.js +2 -2
  3. package/dist/cjs/audio/AudioForDevelopment.d.ts +1 -0
  4. package/dist/cjs/audio/AudioForDevelopment.js +2 -1
  5. package/dist/cjs/audio/AudioForRendering.d.ts +1 -0
  6. package/dist/cjs/audio/AudioForRendering.js +1 -1
  7. package/dist/cjs/audio/props.d.ts +1 -0
  8. package/dist/cjs/index.d.ts +1 -2
  9. package/dist/cjs/index.js +4 -5
  10. package/dist/cjs/internals.d.ts +0 -23
  11. package/dist/cjs/internals.js +0 -18
  12. package/dist/cjs/no-react.d.ts +32 -0
  13. package/dist/cjs/no-react.js +30 -0
  14. package/dist/cjs/use-media-in-timeline.d.ts +2 -1
  15. package/dist/cjs/use-media-in-timeline.js +3 -2
  16. package/dist/cjs/validation/validate-composition-id.js +1 -1
  17. package/dist/cjs/validation/validate-folder-name.js +1 -1
  18. package/dist/cjs/version.d.ts +1 -1
  19. package/dist/cjs/version.js +1 -1
  20. package/dist/cjs/video/OffthreadVideo.js +2 -2
  21. package/dist/cjs/video/OffthreadVideoForRendering.js +1 -1
  22. package/dist/cjs/video/Video.d.ts +1 -0
  23. package/dist/cjs/video/Video.js +3 -3
  24. package/dist/cjs/video/VideoForDevelopment.d.ts +1 -0
  25. package/dist/cjs/video/VideoForDevelopment.js +17 -3
  26. package/dist/cjs/video/VideoForRendering.d.ts +1 -0
  27. package/dist/cjs/video/VideoForRendering.js +1 -1
  28. package/dist/cjs/video/props.d.ts +2 -0
  29. package/dist/cjs/video/video-fragment.d.ts +1 -1
  30. package/dist/cjs/video/video-fragment.js +11 -17
  31. package/dist/esm/index.mjs +496 -526
  32. package/dist/esm/no-react.mjs +748 -0
  33. package/dist/esm/version.mjs +1 -1
  34. package/no-react.js +2 -0
  35. package/package.json +11 -2
  36. package/rollup-no-react.config.js +22 -0
@@ -1,23 +1,24 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.isIosSafari = exports.useAppendVideoFragment = exports.appendVideoFragment = void 0;
3
+ exports.useAppendVideoFragment = exports.appendVideoFragment = exports.isIosSafari = void 0;
4
4
  const react_1 = require("react");
5
5
  const toSeconds = (time, fps) => {
6
6
  return Math.round((time / fps) * 100) / 100;
7
7
  };
8
+ const isIosSafari = () => {
9
+ return typeof window === 'undefined'
10
+ ? false
11
+ : /iP(ad|od|hone)/i.test(window.navigator.userAgent) &&
12
+ Boolean(navigator.userAgent.match(/Version\/[\d.]+.*Safari/));
13
+ };
14
+ exports.isIosSafari = isIosSafari;
8
15
  // https://github.com/remotion-dev/remotion/issues/1655
9
- const isIOSSafariCase = (actualSrc) => {
10
- if (typeof window === 'undefined') {
11
- return false;
12
- }
13
- const isIpadIPodIPhone = /iP(ad|od|hone)/i.test(window.navigator.userAgent);
14
- const isSafari = Boolean(navigator.userAgent.match(/Version\/[\d.]+.*Safari/));
15
- const isChrome = Boolean(navigator.userAgent.match(/CriOS\//));
16
- return (isIpadIPodIPhone && (isSafari || isChrome) && actualSrc.startsWith('blob:'));
16
+ const isIOSSafariAndBlob = (actualSrc) => {
17
+ return (0, exports.isIosSafari)() && actualSrc.startsWith('blob:');
17
18
  };
18
19
  const appendVideoFragment = ({ actualSrc, actualFrom, duration, fps, }) => {
19
20
  var _a;
20
- if (isIOSSafariCase(actualSrc)) {
21
+ if (isIOSSafariAndBlob(actualSrc)) {
21
22
  return actualSrc;
22
23
  }
23
24
  if (actualSrc.startsWith('data:')) {
@@ -60,10 +61,3 @@ const useAppendVideoFragment = ({ actualSrc: initialActualSrc, actualFrom: initi
60
61
  return appended;
61
62
  };
62
63
  exports.useAppendVideoFragment = useAppendVideoFragment;
63
- const isIosSafari = () => {
64
- return typeof window === 'undefined'
65
- ? false
66
- : /iP(ad|od|hone)/i.test(window.navigator.userAgent) &&
67
- Boolean(navigator.userAgent.match(/Version\/[\d.]+.*Safari/));
68
- };
69
- exports.isIosSafari = isIosSafari;