
Security News
Node.js Drops Bug Bounty Rewards After Funding Dries Up
Node.js has paused its bug bounty program after funding ended, removing payouts for vulnerability reports but keeping its security process unchanged.
runtime 环境 websocket 连接
import { Socket } from 'castiron'
const options = {
"wsUrl": "ws://10.168.1.233:8765", // websocket 地址
};
const socket = new Socket(options)
socket.on('data', (data) => {
// 分析结果数据
console.log(data);
});
socket.on('error', (data) => {
// 错误信息
});
on(eventName:
string, cb:Function)
注册监听事件
eventName
open: socket 连接上close: socket 已关闭error: socket 错误data: 数据信息off(eventName:
string, cb:Function)
移除事件监听
disconnect()
关闭 socket
setWsUrl(wsUrl:
string)
变更 socket 地址
播放器
import { VideoPlayer } from 'castiron'
const config = {
"wsUrl": "ws://10.168.1.233:8765", // websocket 地址
"el": "#player"
}
const player = new VideoPlayer(config)
player.play();
// 监听分析结果信息
player.socket.on('data', (data) => {
console.log(data);
});
on(eventName:
string, cb:Function)
注册监听事件
eventName:
canvasAttr: cavnas 宽高变化off(eventName:
string, cb:Function)
移除事件监听
play()
开始播放
pause()
暂停播放
destroy()
销毁播放器
imageCanvas
视频播放的 canvas 的环境
poseCanvas
骨骼点绘画的 canvas 的环境
configCanvas
graph 配置信息绘画的 canvas 的环境
resultCanvas
分析结果绘画的 canvas 环境
canvasWidth
canvas 宽度
canvasHeight
canvas 高度
status
当前视频流的播放状态: pending, running, pauseing, closed
poseStatus:
pending,running,pauseing,closed
当前骨骼点的播放状态
socket
socket 实例(如果传递了 wsUrl 参数就会有此属性)
API 接口
import { API } from 'castiron'
const config = {
"bootstrapServer": "http://10.168.1.233:8000"
}
const api = new API(config)
api.getSchedulerGraph().then(graph => {
console.log(graph);
});
getSchedulerGraph()
获取当前使用的 graph 配置新
setSchedulerGraph(params: GraphConfig)
设置新的 graph 配置信息
restartScheduler()
重启调度器
FAQs
castiron sdk
The npm package castiron receives a total of 3 weekly downloads. As such, castiron popularity was classified as not popular.
We found that castiron demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer 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.

Security News
Node.js has paused its bug bounty program after funding ended, removing payouts for vulnerability reports but keeping its security process unchanged.

Security News
The Axios compromise shows how time-dependent dependency resolution makes exposure harder to detect and contain.

Research
A supply chain attack on Axios introduced a malicious dependency, plain-crypto-js@4.2.1, published minutes earlier and absent from the project’s GitHub releases.