2.2.0 • Published 3 years ago
tv-automation-server-core-integration v2.2.0
Sofie: The Modern TV News Studio Automation System (Server Core Integration)
This library is used to connect to the Sofie Server Core from other Node processes.
This is a part of the Sofie TV News Studio Automation System.
Getting started
Typescript
import { CoreConnection, PeripheralDeviceAPI } from 'tv-automation-server-core-integration'
// Set up our basic credentials:
let core = new CoreConnection({
deviceId: 'device01', // Unique id
deviceToken: 'mySecretToken', // secret token, used to authenticate this device
deviceType: PeripheralDeviceAPI.DeviceType.PLAYOUT,
deviceName: 'My peripheral device'
})
core.on('error', console.log)
// Initiate connection to Core:
core.init({
host: '127.0.0.1',
port: 3000
}).then(() => {
// Connection has been established
console.log('Connected!')
// Set device status:
return core.setStatus({
statusCode: PeripheralDeviceAPI.StatusCode.GOOD,
messages: ['Everything is awesome!']
})
})
.catch((err) => {
console.log(err)
})
Development
- Installation
- Install Yarn from https://yarnpkg.com
- Install Jest,
yarn global add jest
- Install npm dependencies,
yarn
- Build
- Build,
yarn build
- Run tests,
yarn test
- Run tests & watch,
yarn watch
- Build,
DDP Client
This library has a self-contained DDP client that can be used independently of the rest of the module.
import { DDPClient, DDPConnectorOptions } from 'tv-automation-server-integration'
let options: DDPConnectorOptions = {
host: '127.0.0.1',
port: 5432
}
let ddp = new DDPClient(options)
ddp.on('connected', /* ... */ )
ddp.connect((err: any) => {
if (err) {
/* ... handle error ... */
return
}
let subId = ddp.subscribe('expectedMediaItems')
ddp.observe('expectedMediaItems', /* added cb */, /* changed cb */, /* removed cb */)
/* ... then later ... */
ddp.unsub(subId)
ddp.close()
})
See the documentation on the DDP client class for more details.
2.2.0-nightly-20201208-064312-9993aef.0
3 years ago
2.2.0
3 years ago
2.1.0
3 years ago
2.0.0
4 years ago
2.0.0-nightly-20200902-061326-d9987f6.0
4 years ago
2.0.0-nightly-20200601-165402-f5b88e1.0
4 years ago
1.5.1
4 years ago
1.5.0
4 years ago
1.5.0-nightly-20200507-105258-36329a8.0
4 years ago
1.4.1-nightly-20200430-153537-3acae5f.0
4 years ago
1.5.0-nightly-20200430-153849-5b7c35d.0
4 years ago
1.4.0
4 years ago
1.3.0
4 years ago
1.2.1
5 years ago
1.2.0
5 years ago
1.1.0
5 years ago
1.0.1
5 years ago
1.0.0
5 years ago
0.9.0
5 years ago
0.8.0
5 years ago
0.7.0
5 years ago
0.6.3
5 years ago
0.6.2
6 years ago
0.6.1
6 years ago
0.6.0
6 years ago
0.5.1
6 years ago
0.5.0
6 years ago
0.4.1
6 years ago
0.4.0
6 years ago
0.3.2
6 years ago
0.3.1
6 years ago
0.3.0
6 years ago
0.2.0
6 years ago
0.1.2
6 years ago
0.1.1
6 years ago
0.1.0
6 years ago