Research
Security News
Malicious npm Packages Inject SSH Backdoors via Typosquatted Libraries
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
react-sequence-frame-player
Advanced tools
提供两种使用方式:hook `useReactSequenceFramePlayer()` 和 组件式 `<ReactSequenceFramePlayer />`。
提供两种使用方式:hook useReactSequenceFramePlayer()
和 组件式 <ReactSequenceFramePlayer />
。
https://www.npmjs.com/package/react-sequence-frame-player
https://github.com/wxad/react-sequence-frame-player
import {
useReactSequenceFramePlayer,
IReactSequenceFramePlayerHookProps,
} from 'react-sequence-frame-player';
const baseProps: Partial<IReactSequenceFramePlayerHookProps> = {
// 图片地址数组,如果 urls?.length > 0,pattern 参数无效
// urls: [],
// 图片地址 pattern,其中必须包含 %d 或 %02d 或 %04d,以指定序号的规则是几位数,组件会依靠此规则请求图片
pattern:
'https://wxa.wxs.qq.com/wxad-design/yijie/bm23-test-2/mengxin/images/_1-61__%d.webp',
// 序列帧总数,如果 urls?.length > 0,此参数无效
total: 60,
// 序列帧 fps
fps: 30,
// 序列帧开始序号,默认为 0
// startIndex: 0,
// 是否自动播放
autoPlay: false,
// 是否循环播放
loop: true,
// 是否显示第一帧
showFirstFrame: true,
// 准备好后的回调,代表所有图片已加载完成
onReady: () => {},
// 开始播放时的回调
onStart: () => {},
// 播放进度回调,参数为 0 ~ 1 的小数
onProgress: progress => {},
// 播放完成时的回调,注意当 loop 为 true 时,此回调不会触发
onEnd: () => {},
// 播放循环回调,参数为当前循环次数
onLooped: loop => {},
};
const { dom, play, pause } = useReactSequenceFramePlayer({
...baseProps,
});
import {
ReactSequenceFramePlayer,
IReactSequenceFramePlayerRef,
IReactSequenceFramePlayerHookProps,
} from 'react-sequence-frame-player';
return (
<ReactSequenceFramePlayer
ref={playerRef}
width={300}
height={300}
{...baseProps}
/>
);
FAQs
提供两种使用方式:hook `useReactSequenceFramePlayer()` 和 组件式 `<ReactSequenceFramePlayer />`。
We found that react-sequence-frame-player demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 0 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Research
Security News
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
Security News
MITRE's 2024 CWE Top 25 highlights critical software vulnerabilities like XSS, SQL Injection, and CSRF, reflecting shifts due to a refined ranking methodology.
Security News
In this segment of the Risky Business podcast, Feross Aboukhadijeh and Patrick Gray discuss the challenges of tracking malware discovered in open source softare.