
Security News
Another Round of TEA Protocol Spam Floods npm, But It’s Not a Worm
Recent coverage mislabels the latest TEA protocol spam as a worm. Here’s what’s actually happening.
@livepeer/webrtmp-sdk
Advanced tools
THIS SDK IS DEPRECATED. REACT DEVELOPERS SHOULD USE THE NEW BROADCAST SDK, AND ALL OTHER DEVELOPERS SHOULD FOLLOW THIS GUIDE ON WEBRTC BROADCASTING
JavaScript SDK for streaming media via RTMP from the Web. Originally designed for Livepeer.com, but can be used for any other service by running your own webrtmp-server.
This SDK works best on Chrome Desktop, as it currently only supports WebSocket on H.264-capable browsers. We are working on WebRTC support to allow the use of non-Chrome and non-Desktop browsers. Check out the Browser Support section for more.
Add the following script tag to the header of your HTML file:
<script src="https://unpkg.com/@livepeer/webrtmp-sdk@0.2.3/dist/index.js"></script>
The API will be available as a global named webRTMP:
const { Client } = webRTMP
yarn add @livepeer/webrtmp-sdk
npm install @livepeer/webrtmp-sdk
The API can then be imported as a regular module:
const { Client } = require('webrtmp-sdk')
In order to stream through Livepeer, you are going to need a secret streamKey,
which can be obtained by following these steps:
{{STREAM_KEY}} in the example below.const client = new Client()
async function start() {
const streamKey = '{{STREAM_KEY}}'
const stream = await navigator.mediaDevices.getUserMedia({
video: true,
audio: true
})
const session = client.cast(stream, streamKey)
session.on('open', () => {
console.log('Stream started.')
})
session.on('close', () => {
console.log('Stream stopped.')
})
session.on('error', (err) => {
console.log('Stream error.', err.message)
})
}
start()
NOTE: If you have multiple streaming users you will need a separate
streamKeyfor each of them. So you should have a backend service programmatically create a stream through Livepeer API and return thestreamKeyfor your front-end. Check out Livepeer API Documentation on how to get an API key and then how to create a stream.
We provide a utility function to check whether the current browser is supported by the SDK:
const { isSupported } = require('@livepeer/webrtmp-sdk')
if (!isSupported()) {
alert('webrtmp-sdk is not currently supported on this browser')
}
The examples folder at the root of this repository contains two projects:
For a full working example, check out justcast.it (source code).
Pull Requests are always welcome!
MIT
FAQs
JavaScript SDK for streaming media via RTMP from the Web.
The npm package @livepeer/webrtmp-sdk receives a total of 179 weekly downloads. As such, @livepeer/webrtmp-sdk popularity was classified as not popular.
We found that @livepeer/webrtmp-sdk demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 6 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
Recent coverage mislabels the latest TEA protocol spam as a worm. Here’s what’s actually happening.

Security News
PyPI adds Trusted Publishing support for GitLab Self-Managed as adoption reaches 25% of uploads

Research
/Security News
A malicious Chrome extension posing as an Ethereum wallet steals seed phrases by encoding them into Sui transactions, enabling full wallet takeover.