![require(esm) Backported to Node.js 20, Paving the Way for ESM-Only Packages](https://cdn.sanity.io/images/cgdhsj6q/production/be8ab80c8efa5907bc341c6fefe9aa20d239d890-1600x1097.png?w=400&fit=max&auto=format)
Security News
require(esm) Backported to Node.js 20, Paving the Way for ESM-Only Packages
require(esm) backported to Node.js 20, easing the transition to ESM-only packages and reducing complexity for developers as Node 18 nears end-of-life.
skyway-m-pipe-sdk
Advanced tools
SDK of SkyWay Media Pipeline Factory (M-PIPE)
$ npm insatll skyway-m-pipe-sdk
Connector SDK of M-PIPE components
const { InputStream } = require('skyway-m-pipe-sdk/connector');
const inputStream = new InputStream();
// you need to set hostname and port number of previous component
// please make sure that same token with previous as well
inputStream.start({ host: inHost, port: inPort, token });
inputStream.on( 'data', data => {
// #=> data.type - arbitrary type data in string format
// data.meta - arbitrary meta data in string format
// data.payload - arbitrary payload data in binary format
})
const { OutputStream } = require('skyway-m-pipe-sdk/connector');
const outputStream = new OutputStream();
outputStream.start({ port: outPort, token })
outputStream.write({
type: 'test-stream',
meta: JSON.stringify({ name: test, ts: Date.now() }),
payload: Buffer.from( 'Hello world' )
})
Interface SDK of event gateway of M-PIPE
const EventGateway = require('m-pipe-sdk/event-gateway')
const ufUrl = `http://${hostname}:${port}`
const eventGateway = new EventGateway( { host: evHost } )
// register functions
await eventGateway.registUrl( 'statem.noticePeerid', `${ufUrl}/peerid` )
await eventGateway.registUrl( 'statem.noticeConnected', `${ufUrl}/connected` )
await eventGateway.registUrl( 'statem.reqClosing', `${ufUrl}/close` )
// subscribe bindings
await eventGateway.subscribe( 'webrtc.session.ready', 'statem.noticePeerid' )
await eventGateway.subscribe( 'webrtc.session.connected', 'statem.noticeConnected' )
await eventGateway.subscribe( 'webrtc.session.closing', 'statem.reqClosing' )
const EventGateway = require('m-pipe-sdk/event-gateway')
const eventGateway = new EventGateway( { host: evHost } )
eventGateway.emit('webrtc.session.closed', { token })
Copyright. NTT Communications Corporation All rights reserved.
FAQs
SDK for m-pipe
We found that skyway-m-pipe-sdk demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 4 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
require(esm) backported to Node.js 20, easing the transition to ESM-only packages and reducing complexity for developers as Node 18 nears end-of-life.
Security News
PyPI now supports iOS and Android wheels, making it easier for Python developers to distribute mobile packages.
Security News
Create React App is officially deprecated due to React 19 issues and lack of maintenance—developers should switch to Vite or other modern alternatives.