This commit is contained in:
2020-05-22 14:53:57 +07:00
commit aecfe55df8
940 changed files with 159763 additions and 0 deletions

37
node_modules/node-rtsp-stream/test/tests.js generated vendored Normal file
View File

@@ -0,0 +1,37 @@
// Generated by CoffeeScript 2.4.1
(function() {
var assert;
assert = require('assert');
describe('node-rstp-stream', function() {
var VideoStream;
VideoStream = require('../');
return it('should not throw an error when instantiated', function(done) {
var videoStream;
videoStream = new VideoStream({
name: 'wowza',
streamUrl: 'rtsp://184.72.239.149/vod/mp4:BigBuckBunny_115k.mov',
wsPort: 9999,
width: 240,
height: 160,
ffmpegOptions: {
'-stats': '',
'-r': '30'
}
});
videoStream.on('exitWithError', () => {
videoStream.stop();
assert.fail('videoStream exited with error');
return done();
});
// Must use setTimeout because we need the stream instantiated before we can stop it
// otherwise it blocks the test runner from exiting.
return setTimeout(() => {
videoStream.stop();
return done();
}, 1900);
});
});
}).call(this);