custom-media: import spec and fix a minor missed validation

This commit is contained in:
Calvin Montgomery 2017-08-08 20:46:10 -07:00
parent 04c9d48779
commit 92f0a956b9
3 changed files with 181 additions and 2 deletions

View file

@ -89,6 +89,16 @@ describe('custom-media', () => {
assert.throws(() => validate(invalid), /URL protocol must be HTTPS/);
});
it('rejects non-live HLS', () => {
invalid.live = false;
invalid.sources[0].contentType = 'application/x-mpegURL';
assert.throws(
() => validate(invalid),
/contentType "application\/x-mpegURL" requires live: true/
);
});
});
describe('#validateSources', () => {