init
This commit is contained in:
37
node_modules/node-rtsp-stream/test/tests.js
generated
vendored
Normal file
37
node_modules/node-rtsp-stream/test/tests.js
generated
vendored
Normal 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);
|
||||
Reference in New Issue
Block a user