Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@remotion/player

Package Overview
Dependencies
Maintainers
1
Versions
804
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@remotion/player - npm Package Compare versions

Comparing version 2.5.0-alpha.ee579a98 to 3.0.0-lambda.2

LICENSE.md

1

dist/index.d.ts

@@ -0,1 +1,2 @@

/// <reference types="react" />
import { PlayerEmitter } from './event-emitter';

@@ -2,0 +3,0 @@ export { Player } from './Player';

@@ -0,1 +1,2 @@

/// <reference types="react" />
export declare const PlayerSeekBar: React.FC<{

@@ -2,0 +3,0 @@ durationInFrames: number;

4

dist/test/test-utils.d.ts

@@ -1,7 +0,7 @@

import { RenderOptions } from '@testing-library/react';
import { queries, RenderOptions } from '@testing-library/react';
import { FC, ReactElement } from 'react';
declare const HelloWorld: FC;
declare const customRender: (ui: ReactElement, options?: Omit<RenderOptions<typeof import("@testing-library/dom/types/queries"), HTMLElement>, "queries"> | undefined) => import("@testing-library/react").RenderResult<typeof import("@testing-library/dom/types/queries"), HTMLElement>;
declare const customRender: (ui: ReactElement, options?: Omit<RenderOptions<typeof queries, HTMLElement>, "queries"> | undefined) => import("@testing-library/react").RenderResult<typeof queries, HTMLElement>;
export * from '@testing-library/react';
export { customRender as render, HelloWorld };
//# sourceMappingURL=test-utils.d.ts.map

@@ -12,2 +12,3 @@ "use strict";

const setFrame = remotion_1.Internals.Timeline.useTimelineSetFrame();
const { inFrame, outFrame, } = remotion_1.Internals.Timeline.useTimelineInOutFramePosition();
const frameRef = (0, react_1.useRef)(frame);

@@ -23,6 +24,28 @@ frameRef.current = frame;

}
const getFrameInRange = (nextFrame) => {
if ((inFrame && nextFrame < inFrame) ||
(inFrame && outFrame && nextFrame > outFrame)) {
return inFrame;
}
if (outFrame && nextFrame > outFrame) {
return 0;
}
return nextFrame;
};
let hasBeenStopped = false;
let reqAnimFrameCall = null;
const startedTime = performance.now();
const startedFrame = frameRef.current;
const startedFrame = getFrameInRange(frameRef.current);
const durationInFrames = (() => {
if (inFrame !== null && outFrame !== null) {
return outFrame - inFrame + 1;
}
if (inFrame !== null) {
return config.durationInFrames - inFrame;
}
if (outFrame !== null) {
return outFrame + 1;
}
return config.durationInFrames;
})();
const stop = () => {

@@ -36,3 +59,3 @@ hasBeenStopped = true;

const time = performance.now() - startedTime;
const nextFrame = Math.round(time / (1000 / config.fps)) + startedFrame;
const nextFrame = Math.round(time / (1000 / config.fps)) + startedFrame - (inFrame !== null && inFrame !== void 0 ? inFrame : 0);
if (nextFrame === config.durationInFrames && !loop) {

@@ -44,3 +67,3 @@ stop();

}
const actualNextFrame = nextFrame % config.durationInFrames;
const actualNextFrame = (nextFrame % durationInFrames) + (inFrame !== null && inFrame !== void 0 ? inFrame : 0);
if (actualNextFrame !== frameRef.current) {

@@ -57,3 +80,3 @@ setFrame(actualNextFrame);

};
}, [config, loop, pause, playing, setFrame, emitter]);
}, [config, loop, pause, playing, setFrame, emitter, inFrame, outFrame]);
(0, react_1.useEffect)(() => {

@@ -60,0 +83,0 @@ const interval = setInterval(() => {

{
"name": "@remotion/player",
"version": "2.5.0-alpha.ee579a98",
"version": "3.0.0-lambda.2+a97302554",
"description": "Remotion Player",

@@ -27,3 +27,3 @@ "main": "dist/index.js",

"dependencies": {
"remotion": "2.5.0-alpha.ee579a98"
"remotion": "^3.0.0-lambda.2+a97302554"
},

@@ -35,13 +35,14 @@ "peerDependencies": {

"devDependencies": {
"@jonny/eslint-config": "^2.1.233",
"@jonny/eslint-config": "^2.1.248",
"@testing-library/react": "^11.2.2",
"@types/jest": "^26.0.19",
"@types/jest": "^27.0.2",
"@types/node": "^14.14.14",
"@types/react": "17.0.19",
"@types/react": "17.0.27",
"@types/react-dom": "^17.0.0",
"csstype": "^3.0.9",
"eslint": "^7.4.0",
"jest": "^26.6.3",
"jest": "^27.2.4",
"prettier": "^2.0.5",
"prettier-plugin-organize-imports": "^1.1.1",
"ts-jest": "^26.4.4",
"ts-jest": "^27.0.5",
"typescript": "^4.4.2",

@@ -52,3 +53,4 @@ "webpack": "^5.21.2"

"access": "public"
}
},
"gitHead": "a97302554ea1cc85a8682345f2ace2c30e4a9e8b"
}

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc