diff --git a/package.json b/package.json index 120596a0..569d6787 100644 --- a/package.json +++ b/package.json @@ -2,7 +2,7 @@ "author": "Calvin Montgomery", "name": "CyTube", "description": "Online media synchronizer and chat", - "version": "3.82.10", + "version": "3.82.11", "repository": { "url": "http://github.com/calzoneman/sync" }, diff --git a/src/custom-media.js b/src/custom-media.js index a43c920d..88c202ab 100644 --- a/src/custom-media.js +++ b/src/custom-media.js @@ -30,10 +30,6 @@ const SOURCE_CONTENT_TYPES = new Set([ 'video/webm' ]); -const LIVE_ONLY_CONTENT_TYPES = new Set([ - 'application/dash+xml' -]); - export function lookup(url, opts) { if (!opts) opts = {}; if (!opts.hasOwnProperty('timeout')) opts.timeout = 10000; @@ -163,11 +159,11 @@ export function validate(data) { validateURL(data.thumbnail); } - validateSources(data.sources, data); + validateSources(data.sources); validateTextTracks(data.textTracks); } -function validateSources(sources, data) { +function validateSources(sources) { if (!Array.isArray(sources)) throw new ValidationError('sources must be a list'); if (sources.length === 0) @@ -183,11 +179,6 @@ function validateSources(sources, data) { `unacceptable source contentType "${source.contentType}"` ); - if (LIVE_ONLY_CONTENT_TYPES.has(source.contentType) && !data.live) - throw new ValidationError( - `contentType "${source.contentType}" requires live: true` - ); - if (!SOURCE_QUALITIES.has(source.quality)) throw new ValidationError(`unacceptable source quality "${source.quality}"`); diff --git a/test/custom-media.js b/test/custom-media.js index 4bbca818..b432a3f5 100644 --- a/test/custom-media.js +++ b/test/custom-media.js @@ -90,15 +90,6 @@ describe('custom-media', () => { assert.throws(() => validate(invalid), /URL protocol must be HTTPS/); }); - it('rejects non-live DASH', () => { - invalid.live = false; - invalid.sources[0].contentType = 'application/dash+xml'; - - assert.throws( - () => validate(invalid), - /contentType "application\/dash\+xml" requires live: true/ - ); - }); }); describe('#validateSources', () => {