rtsp-relay
rtsp-relay copied to clipboard
Always got disconnect
Hello, I always get disconnect when try to play rtsp video. this is my code: server.js
app.ws('/api/stream/', (ws, req) =>
proxy({
url: 'rtsp://wowzaec2demo.streamlock.net/vod/mp4:BigBuckBunny_115k.mp4',
transport: 'tcp'
})(ws),
);
rtsp.js
loadPlayer({
url: 'ws://' + document.location.host + '/api/stream/',
canvas: document.getElementById('canvas-video-full-6225d0f79e86472160ef180e'),
// optional
onPlay: (data) => {
console.log('onPlay', Date.now());
},
onPause: function() {
console.log('onPause', Date.now());
},
onEnded: function() {
console.log('onEnded', Date.now());
},
onStalled: function() {
console.log('onStalled', new Date.now());
},
onSourceCompleted: function() {
console.log('onSourceCompleted', Date.now());
},
onDisconnect: function (){
console.log('connection lost!');
}
});
```
and I Always get return "connection lost!"

Same problem. It seems that the publisher is ignoring us
give it some time, increase the disconnectThreshold. worked for me
While playing an RTSP video, 'onDisconnect' is always called