This is the KAIROS Connection library of the Sofie TV Automation System. The library is used for controlling Panasonic KAIROS devices.
This project is composed of a few different packages:
You can find the auto-generated type docs here.
The kairos-connection library is a library for communicating with the Panasonic KAIROS video switchers using SPKCP (Simple Panasonic Kairos Control Protocol) / TCP.
| Version | Status | Notes |
|---|---|---|
| 2.0 | Compatible | Some commands not implemented |
| 1.7 | Compatible | Some commands not implemented. Properties not available in 1.7 are filled with default values. Will throw errors if methods not available in 1.7 are called. |
import * as Kairos from 'kairos-connection'
const kairos = new Kairos.KairosConnection({
host: '127.0.0.1',
// port: 3005, // Optional, defaults to 3005
})
kairos.addListener('disconnect', () => console.log('Disconnected'))
kairos.addListener('error', (e) => console.log('Error', e))
kairos.addListener('connect', () => {
console.log('Connected!')
Promise.resolve().then(async () => {
// List scenes and media clips:
console.log(await kairos.listScenes())
console.log(await kairos.listMediaClips())
const refClipPlayer = Kairos.refClipPlayer(1)
const refScene = Kairos.refScene(['Main'])
const refSceneLayer = Kairos.refSceneLayer(refScene, ['Layer-1'])
// Special method to load a clip into a clip player (and wait for it to be loaded):
await kairos.loadClipPlayerClip(refClipPlayer, {
clip: Kairos.refMediaClip(['My-Clip.mxf']),
position: 0,
})
// Start playing the clip:
await kairos.clipPlayerPlay(refClipPlayer)
// Display the clip on a scene layer:
await kairos.updateSceneLayer(refSceneLayer, {
sourceA: refClipPlayer,
})
})
})