
Security News
Open Source Maintainers Feeling the Weight of the EU’s Cyber Resilience Act
The EU Cyber Resilience Act is prompting compliance requests that open source maintainers may not be obligated or equipped to handle.
hapi-ams-sdk
Advanced tools
Hapi plugin for Microsoft Azure Media Services REST API, based on node-ams-sdk project, but wrapped in an Hapi plugin with Channels support
npm i --save hapi-ams-sdk
You initialize the service by providing a configuration object
var HapiAmsSdk = require('hapi-ams-sdk')
var configObj = {
client_id: "",
client_secret: ""
}
var serviceConfig = require('../path/to/config') || configObj
...
// Register Azure Media Services REST API wrapper plugin
server.register({
register: HapiAmsSdk,
options: serviceConfig
}, (err) => {
if (err) {
console.log(err)
throw err
}
// You can always access the amsService in your Hapi project
var amsService = server.plugins['hapi-ams-sdk'].amsService
var data = ''
amsService.listChannels()
.on('data', (d) => {
data += d
console.log(d)
})
.on('error', (e) => {
console.log(e)
})
.on('end', () => {
console.log(data)
// var jsonData = JSON.parse(data)
})
})
####listChannels([cb])
Takes an optional callback. Will list all channels - streaming if no cb.
####getChannel(channelId, [cb])
Requires a channelId like ''nb:chid:UUID:2c30f424-ab90-40c6-ba41-52a993e9d393''. Will return all information for a channel. Will stream if optional callback is not provided.
####resetChannel(channelId, cb)
Requires a channelId like ''nb:chid:UUID:2c30f424-ab90-40c6-ba41-52a993e9d393''. Will return an object with a 'operationId' property (String). You can use this operationId string to poll AMS with a 'getOperationState' call.
####getOperationState(operationId, [cb])
Requires a operationId like ''nb:opid:UUID:9e17ee32-99eb-45f0-8b0f-08f4e8304833''. Will return all information for a long operation like Start/Stop/Reset Channel. Will stream if optional callback is not provided.
FAQs
Hapi plugin for Microsoft Azure Media Services REST API
The npm package hapi-ams-sdk receives a total of 7 weekly downloads. As such, hapi-ams-sdk popularity was classified as not popular.
We found that hapi-ams-sdk demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer 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
The EU Cyber Resilience Act is prompting compliance requests that open source maintainers may not be obligated or equipped to handle.
Security News
Crates.io adds Trusted Publishing support, enabling secure GitHub Actions-based crate releases without long-lived API tokens.
Research
/Security News
Undocumented protestware found in 28 npm packages disrupts UI for Russian-language users visiting Russian and Belarusian domains.