Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

wip: Add tests #1

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 21 additions & 0 deletions test/hls_stream.yaml
Original file line number Diff line number Diff line change
@@ -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
10 changes: 10 additions & 0 deletions test/server.js
Original file line number Diff line number Diff line change
@@ -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);