Security News
Bun 1.2 Released with 90% Node.js Compatibility and Built-in S3 Object Support
Bun 1.2 enhances its JavaScript runtime with 90% Node.js compatibility, built-in S3 and Postgres support, HTML Imports, and faster, cloud-first performance.
@atem-connection/camera-control
Advanced tools
This library can be used with atem-connection NPM Github, to provide a friendly interface for camera control.
import { Atem } from 'atem-connection'
import { AtemCameraControlDirectCommandSender, AtemCameraControlStateBuilder } from '@atem-connection/camera-control'
// Create the class which tracks the current state from the atem
const cameraControlState = new AtemCameraControlStateBuilder(4)
const atem = new Atem({})
atem.connect('10.0.0.1')
// Create the command sender. Alternatively `AtemCameraControlBatchCommandSender` can be used to be able to batch multiple commands to be sent once
const cameraControlSender = new AtemCameraControlDirectCommandSender(atem)
atem.on('connected', () => {
console.log('connected')
// Perform an autofocus of camera 1 after a short timeout
setTimeout(() => {
cameraControlSender.triggerAutoFocus(1)
}, 1000)
})
atem.on('disconnected', () => {
cameraControlState.reset()
})
atem.on('receivedCommands', (commands) => {
const cameraCommands = []
for (const command of commands) {
if (command instanceof Commands.CameraControlUpdateCommand) cameraCommands.push(command)
}
const changes = cameraControlState.applyCommands(cameraCommands)
// Do something based on the reported changes
console.log('camera changes', changes)
})
yarn build
You can run yarn build:main --watch
to rebuild the typescript code, which will re-run upon saving a file.
There are some unit tests, which can be run with yarn unit
. This command calls into jest, so any jest arguments can also be used
FAQs
Library for ATEM Camera control using atem-connection.
The npm package @atem-connection/camera-control receives a total of 23 weekly downloads. As such, @atem-connection/camera-control popularity was classified as not popular.
We found that @atem-connection/camera-control 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.
Security News
Bun 1.2 enhances its JavaScript runtime with 90% Node.js compatibility, built-in S3 and Postgres support, HTML Imports, and faster, cloud-first performance.
Security News
Biden's executive order pushes for AI-driven cybersecurity, software supply chain transparency, and stronger protections for federal and open source systems.
Security News
Fluent Assertions is facing backlash after dropping the Apache license for a commercial model, leaving users blindsided and questioning contributor rights.