diff --git a/test/hls_stream.yaml b/test/hls_stream.yaml new file mode 100644 index 0000000..c6c1e3e --- /dev/null +++ b/test/hls_stream.yaml @@ -0,0 +1,21 @@ +config: + target: "http://localhost:10888" + phases: + - arrivalCount: 4 + duration: 1 + plugins: + hls: {} +scenarios: + - flow: + - get: + url: "/streams/x36xhzz/x36xhzz.m3u8" + debugThrottle: true + hls: # Must be set to options object or true + concurrency: 10 # defaults to 4 + # # If not specified, a stream is selected at random. Only one selector may be specified: + streamSelector: + resolution: + width: 320 + height: 184 + # No throttling if not specified - will contend with other network users on the same machine: + #throttle: 100 # kb diff --git a/test/server.js b/test/server.js new file mode 100644 index 0000000..132866d --- /dev/null +++ b/test/server.js @@ -0,0 +1,10 @@ +const HLSServer = require('hls-server'); +const http = require('http'); +const path = require('path'); + +const server = http.createServer(): +const hls = new HLSServer(server, { + path: '/streams', + dir: path.resolve(__dirname, 'videos') +}); +server.listen(process.env.PORT || 10888);