Sofie Quantel Gateway Client

4.0.0 · active · verified Tue Apr 21

This is a client library specifically designed for communication with the Sofie Quantel Gateway, an integral component of the open-source Sofie TV Automation System. It acts as an abstraction layer, allowing Node.js applications to interact with Quantel ISA (Integrated Production Archive) systems. The library facilitates discovery of clips, management of playout control on Quantel servers, and handles the underlying HTTP REST API communication with the Quantel Gateway, which itself bridges to the complex Quantel ISA System's CORBA API. Currently at version 4.0.0, the package primarily supports modern Node.js environments (>=18.0) and ships with TypeScript type definitions, providing a robust and type-safe interface for broadcast automation workflows. It focuses on simplifying interaction with professional broadcast hardware within the Sofie ecosystem, abstracting away low-level network and protocol complexities.

Common errors

Warnings

Install

Imports

Quickstart

This example demonstrates how to initialize the `QuantelGateway` client, connect to a specified gateway and ISA system, and then properly dispose of the client. It uses environment variables for configuration for easy setup.

import { QuantelGateway } from 'tv-automation-quantel-gateway-client';

async function runQuantelClient() {
  const quantelClient = new QuantelGateway();

  const gatewayUrl = process.env.QUANTEL_GATEWAY_URL ?? 'http://localhost:3000';
  const isaUrl = process.env.QUANTEL_ISA_URL ?? 'http://quantel.isa.manager:2099';
  const zoneId = process.env.QUANTEL_ZONE_ID ?? 'default';
  const serverId = process.env.QUANTEL_SERVER_ID ?? '1100'; // Example server ID

  try {
    console.log(`Attempting to connect to Gateway: ${gatewayUrl}, ISA: ${isaUrl}`);
    await quantelClient.init(gatewayUrl, isaUrl, zoneId, serverId);
    console.log('Successfully connected to Quantel Gateway.');

    // Example: Fetching server information if serverId is not initially known
    // await quantelClient.connectToISA(isaUrl);
    // const servers = await quantelClient.getServers(zoneId);
    // console.log('Available Servers:', servers.map(s => s.id));

    // Here you would add your logic to interact with Quantel, e.g., get clips, control playout
    console.log('Client is ready for Quantel operations.');

  } catch (error) {
    console.error('Failed to initialize Quantel Gateway client:', error);
    process.exit(1);
  } finally {
    // Always call dispose to clean up resources
    quantelClient.dispose();
    console.log('Quantel Gateway client disposed.');
  }
}

runQuantelClient();

view raw JSON →