0.1.5 • Published 7 months ago

@osaas/fast-engine-client v0.1.5

Weekly downloads
-
License
MIT
Repository
github
Last release
7 months ago

Open Source FAST Engine as a Service SDK

The @osaas/fast-engine-client is an SDK for the hosted version of the open source FAST Engine. For access you need a TOKEN and to request a token or get more information about the service contact sales@eyevinn.se however if you want to try it out we have a test environment available that you can use.

The address to the API in the test environment is https://api-ce.stage.osaas.io/ and here you can generate a trial-token to try this out.

Installation

npm install @osaas/fast-engine-client

Usage

import {
  FastEngineOSaaSv1,
  createConfiguration
} from '@osaas/fast-engine-client';

const config = createConfiguration({
  authMethods: {
    jwtToken: 'Bearer ' + process.env.TOKEN
  },
  apiEndpoint: 'https://api-ce.stage.osaas.io'
});
const client = new FastEngineOSaaSv1(config);

Generating a trial token

Only available in the test environment.

import {
  FastEngineOSaaSv1,
  createConfiguration
} from '@osaas/fast-engine-client';

const body: TokenPostRequest = {
  company: 'YOUR_COMPANY',
  email: 'YOUR_EMAIL'
};

const config = createConfiguration({
  apiEndpoint: 'https://api-ce.stage.osaas.io'
});
const client = new FastEngineOSaaSv1(config);
const trialToken = await client.tokenPost({
  company: 'YOUR_COMPANY',
  email: 'YOUR_EMAIL'
});

Launching a new FAST channel

import {
  FastEngineOSaaSv1,
  createConfiguration,
  ChannelPostRequestTypeEnum,
  ChannelPostRequest
} from '@osaas/fast-engine-client';

const body: ChannelPostRequest = {
  name: 'sdktest',
  type: ChannelPostRequestTypeEnum.Playlist,,
  url: 'https://testcontent.eyevinn.technology/fast/fastdemo.txt',
  opts: {
    useDemuxedAudio: false
  }
};

const client = new FastEngineOSaaSv1(config);
await client.channelPost(body);

Getting all running channels

const client = new FastEngineOSaaSv1(configuration);

const channels = await client.channelGet();
channels.forEach((ch) => {
  console.log(`${ch.name}: ${ch.url}`);
});

Stopping and removing a channel

const client = new FastEngineOSaaSv1(configuration);

await client.channelIdDelete('CHANNEL_ID');

License

This project is licensed under the MIT License, see LICENSE.

Support

Join our community on Slack where you can post any questions regarding any of our open source projects. Eyevinn's consulting business can also offer you:

  • Further development of this component
  • Customization and integration of this component into your platform
  • Support and maintenance agreement

Contact sales@eyevinn.se if you are interested.

About Eyevinn Technology

Eyevinn Technology is an independent consultant firm specialized in video and streaming. Independent in a way that we are not commercially tied to any platform or technology vendor. As our way to innovate and push the industry forward we develop proof-of-concepts and tools. The things we learn and the code we write we share with the industry in blogs and by open sourcing the code we have written.

Want to know more about Eyevinn and how it is to work here. Contact us at work@eyevinn.se!

0.1.5

7 months ago

0.1.4

7 months ago

0.1.3

7 months ago

0.1.2

7 months ago

0.1.1

7 months ago

0.1.0

7 months ago