Skip to content

Commit

Permalink
Fix readstream
Browse files Browse the repository at this point in the history
  • Loading branch information
shoom3301 committed Dec 4, 2015
1 parent fe5142b commit 54e2d2d
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
4 changes: 4 additions & 0 deletions RTSPRecorder.js
Original file line number Diff line number Diff line change
Expand Up @@ -146,6 +146,10 @@

this.readStream.stdout.on('close', function() {
self._readStarted = false;
if(self.readStream.connected){
self.readStream.kill();
self.readStream.disconnect();
}
self.readStream = null;
self.reconnect();
});
Expand Down
7 changes: 5 additions & 2 deletions example/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -11,14 +11,17 @@

var oneCamera = false;

var player1 = new jsmpeg( new WebSocket('ws://localhost:8001'), {
var host = '192.168.1.137';
var port = 27115;

var player1 = new jsmpeg( new WebSocket('ws://'+host+':'+27115), {
canvas: document.getElementById('videoCanvas1')
});

player1.play();

if(!oneCamera){
var player2 = new jsmpeg( new WebSocket('ws://localhost:8002'), {
var player2 = new jsmpeg( new WebSocket('ws://'+host+':'+27116), {
canvas: document.getElementById('videoCanvas2')
});

Expand Down

0 comments on commit 54e2d2d

Please sign in to comment.