RTSP stream through WebSocket
npm install node-rtsp-stream-es6shell
npm i node-rtsp-stream-es6
`
Server
`javascript
const Stream = require('videoStream')
const options = {
name: 'streamName',
url: 'rtsp://184.72.239.149/vod/mp4:BigBuckBunny_115k.mov',
port: 5000
}
stream = new Stream(options)
stream.start()
`
Client
`javascript
const WebSocket = require('ws')
const ws = new WebSocket('ws://localhost:5000')
ws.on('open', () => {
console.log('Connected to stream')
})
ws.on('message', (data, flags) => {
console.log(data)
})
``