1
0
Fork 0
mirror of https://github.com/DanielnetoDotCom/YouPHPTube synced 2025-10-04 10:19:24 +02:00
Oinktube/node_modules/mpd-parser/test/segment/durationTimeParser.test.js
Daniel 2a9630258f https://github.com/WWBN/AVideo/issues/6345#issuecomment-1067056556
Also check the lang in case insensitive
2022-03-14 14:28:38 -03:00

29 lines
730 B
JavaScript

import QUnit from 'qunit';
import { segmentRange } from '../../src/segment/durationTimeParser.js';
QUnit.module('segmentRange');
QUnit.test('static range uses periodDuration if available', function(assert) {
assert.deepEqual(
segmentRange.static({
periodDuration: 10,
sourceDuration: 20,
duration: 2,
timescale: 1
}),
{ start: 0, end: 5 },
'uses periodDuration if available'
);
});
QUnit.test('static range uses sourceDuration if available', function(assert) {
assert.deepEqual(
segmentRange.static({
sourceDuration: 20,
duration: 2,
timescale: 1
}),
{ start: 0, end: 10 },
'uses periodDuration if available'
);
});