Skip to content

Commit d51b5f4

Browse files
authored
Update basic.js
1 parent a41d50e commit d51b5f4

File tree

1 file changed

+0
-24
lines changed

1 file changed

+0
-24
lines changed

test/basic.js

Lines changed: 0 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -1,36 +1,12 @@
11
var test = require('tape')
22
var HLSServer = require('./../src/index')
33
var http = require('http')
4-
var ffmpeg = require('fluent-ffmpeg')
54
var httpAttach = require('http-attach')
65
var request = require('request')
76

87
var PORT = 8000
98
var hls
109

11-
var ffmpegHLS = function (inputPath, outputPath, cb) {
12-
return ffmpeg(inputPath, { timeout: 432000 }).addOptions([
13-
'-profile:v baseline',
14-
'-level 3.0',
15-
'-s 640x360',
16-
'-start_number 0',
17-
'-hls_time 10',
18-
'-hls_list_size 0',
19-
'-f hls'
20-
]).output(outputPath).on('end', cb).run()
21-
}
22-
23-
test('ffmpeg', function (t) {
24-
t.plan(2)
25-
26-
ffmpegHLS('test/files/out.mp4', 'test/files/output/out.m3u8', function () {
27-
t.pass('mp4 done')
28-
})
29-
ffmpegHLS('test/files/out2.webm', 'test/files/output/out2.m3u8', function () {
30-
t.pass('webm done')
31-
})
32-
})
33-
3410
test('constructor without http server', function (t) {
3511
t.plan(1)
3612

0 commit comments

Comments
 (0)