Skip to content

Commit

Permalink
Fix: Typings & remove unrelated tests
Browse files Browse the repository at this point in the history
  • Loading branch information
echoy-harmonicinc committed Aug 20, 2021
1 parent 51f6c10 commit e248db4
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 38 deletions.
1 change: 1 addition & 0 deletions AUTHORS
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ Code It <*@code-it.fr>
Charter Communications Inc <*@charter.com>
Damien Deis <[email protected]>
Dany L'Hébreux <[email protected]>
Enson Choy <[email protected]>
Esteban Dosztal <[email protected]>
Fadomire <[email protected]>
Google Inc. <*@google.com>
Expand Down
1 change: 1 addition & 0 deletions CONTRIBUTORS
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ Damien Deis <[email protected]>
Dany L'Hébreux <[email protected]>
Donato Borrello <[email protected]>
Duc Pham <[email protected]>
Enson Choy <[email protected]>
Esteban Dosztal <[email protected]>
Fadomire <[email protected]>
François Beaufort <[email protected]>
Expand Down
40 changes: 2 additions & 38 deletions test/dash/dash_parser_manifest_unit.js
Original file line number Diff line number Diff line change
Expand Up @@ -2151,44 +2151,6 @@ describe('DashParser Manifest', () => {
}
});

it('parses ServiceConfiguration', async () => {
const manifestText = [
`<MPD type="dynamic"`,
' availabilityStartTime="1970-01-01T00:00:00Z"',
' timeShiftBufferDepth="PT60S"',
' maxSegmentDuration="PT5S"',
' suggestedPresentationDelay="PT0S">',
' <ServiceDescription>',
' <Scope schemeIdUri="1" value="scope1" />',
' <Latency target="5000" max="7000" min="4000" />',
' <PlaybackRate max="1.1" min="0.9" />',
' </ServiceDescription>',
' <Period id="1" duration="PT30S">',
' <AdaptationSet id="2" mimeType="video/mp4">',
' <SegmentTemplate media="$Number$.mp4" duration="1" />',
' <Representation id="3" width="640" height="480">',
' <BaseURL>http://example.com/p1/</BaseURL>',
' </Representation>',
' </AdaptationSet>',
' </Period>',
'</MPD>',
].join('\n');

fakeNetEngine.setResponseText('dummy://foo', manifestText);

await parser.start('dummy://foo', playerInterface);

const serviceDescription = parser.getServiceDescription();
expect(serviceDescription).toBeDefined();
expect(serviceDescription.scope.schemeIdUri).toBe('1');
expect(serviceDescription.scope.value).toBe('scope1');
expect(serviceDescription.latency.target).toBe(5000);
expect(serviceDescription.latency.max).toBe(7000);
expect(serviceDescription.latency.min).toBe(4000);
expect(serviceDescription.playbackRate.max).toBe(1.1);
expect(serviceDescription.playbackRate.min).toBe(0.9);
});

/**
* @param {!Array.<number>} periods Start time of multiple periods
* @return {string}
Expand Down Expand Up @@ -2242,11 +2204,13 @@ describe('DashParser Manifest', () => {

for (const source of sources) {
fakeNetEngine.setResponseText('dummy://foo', source);
/** @type {shaka.extern.Manifest} */
// eslint-disable-next-line no-await-in-loop
const manifest = await parser.start('dummy://foo', playerInterface);
const video = manifest.variants[0].video;
// eslint-disable-next-line no-await-in-loop
await video.createSegmentIndex();
goog.asserts.assert(video.segmentIndex, 'Null segmentIndex!');
segments.push(Array.from(video.segmentIndex));
}

Expand Down

0 comments on commit e248db4

Please sign in to comment.