shaka-player 3.3.10 → 3.3.12
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.github/workflows/build-and-test.yaml +42 -22
- package/.github/workflows/compute-incremental-coverage.py +14 -3
- package/.github/workflows/custom-actions/set-commit-status/action.yaml +1 -5
- package/.github/workflows/deflake.yaml +28 -0
- package/.github/workflows/demo-version-index.yaml +9 -1
- package/.github/workflows/nightly-demo.yaml +1 -1
- package/.github/workflows/release-please.yaml +4 -4
- package/.github/workflows/report-incremental-coverage.yaml +1 -1
- package/.github/workflows/selenium-lab-tests.yaml +21 -10
- package/AUTHORS +3 -0
- package/CHANGELOG.md +25 -0
- package/CONTRIBUTORS +2 -0
- package/dist/deps.js +3 -3
- package/dist/locales.js +30 -30
- package/dist/shaka-player.compiled.d.ts +1 -0
- package/dist/shaka-player.compiled.debug.d.ts +1 -0
- package/dist/shaka-player.compiled.debug.externs.js +1 -0
- package/dist/shaka-player.compiled.debug.js +133 -131
- package/dist/shaka-player.compiled.debug.map +4 -4
- package/dist/shaka-player.compiled.externs.js +1 -0
- package/dist/shaka-player.compiled.js +712 -711
- package/dist/shaka-player.compiled.map +4 -4
- package/dist/shaka-player.ui.d.ts +1 -0
- package/dist/shaka-player.ui.debug.d.ts +1 -0
- package/dist/shaka-player.ui.debug.externs.js +1 -0
- package/dist/shaka-player.ui.debug.js +197 -195
- package/dist/shaka-player.ui.debug.map +4 -4
- package/dist/shaka-player.ui.externs.js +1 -0
- package/dist/shaka-player.ui.js +830 -829
- package/dist/shaka-player.ui.map +4 -4
- package/docs/jsdoc-template/publish.js +33 -0
- package/docs/jsdoc-template/tmpl/container.tmpl +4 -1
- package/docs/jsdoc.conf.json +1 -0
- package/docs/tutorials/welcome.md +2 -2
- package/lib/ads/client_side_ad_manager.js +5 -2
- package/lib/cast/cast_sender.js +39 -14
- package/lib/cea/cea608_memory.js +4 -0
- package/lib/media/drm_engine.js +4 -2
- package/lib/media/streaming_engine.js +41 -4
- package/lib/offline/indexeddb/storage_mechanism.js +24 -0
- package/lib/player.js +1 -1
- package/lib/polyfill/media_capabilities.js +1 -0
- package/lib/text/ttml_text_parser.js +69 -87
- package/lib/util/error.js +7 -0
- package/lib/util/periods.js +9 -9
- package/lib/util/platform.js +34 -0
- package/lib/util/stream_utils.js +2 -1
- package/lib/util/xml_utils.js +45 -6
- package/maintained-branches.md +2 -2
- package/package.json +1 -1
- package/test/cea/cea608_memory_unit.js +88 -0
- package/test/media/streaming_engine_integration.js +8 -7
- package/test/offline/offline_integration.js +3 -3
- package/test/offline/storage_integration.js +30 -0
- package/test/test/util/ttml_utils.js +0 -2
- package/test/text/ttml_text_parser_unit.js +46 -0
- package/test/ui/text_displayer_layout_unit.js +17 -2
- package/test/util/periods_unit.js +149 -11
- package/test/util/xml_utils_unit.js +64 -0
|
@@ -371,5 +371,69 @@ describe('XmlUtils', () => {
|
|
|
371
371
|
expect(XmlUtils.parseFloat(HUGE_NUMBER_STRING)).toBe(Infinity);
|
|
372
372
|
expect(XmlUtils.parseFloat('-' + HUGE_NUMBER_STRING)).toBe(-Infinity);
|
|
373
373
|
});
|
|
374
|
+
|
|
375
|
+
describe('parseXmlString', () => {
|
|
376
|
+
it('parses a simple XML document', () => {
|
|
377
|
+
const xmlString = [
|
|
378
|
+
'<?xml version="1.0"?>',
|
|
379
|
+
'<Root>',
|
|
380
|
+
' <Child></Child>',
|
|
381
|
+
'</Root>',
|
|
382
|
+
].join('\n');
|
|
383
|
+
const doc = XmlUtils.parseXmlString(xmlString, 'Root');
|
|
384
|
+
expect(doc).not.toBeNull();
|
|
385
|
+
expect(doc.tagName).toBe('Root');
|
|
386
|
+
});
|
|
387
|
+
|
|
388
|
+
it('returns null on an empty XML document', () => {
|
|
389
|
+
const xmlString = '';
|
|
390
|
+
const doc = XmlUtils.parseXmlString(xmlString, 'Root');
|
|
391
|
+
expect(doc).toBeNull();
|
|
392
|
+
});
|
|
393
|
+
|
|
394
|
+
it('returns null on malformed XML', () => {
|
|
395
|
+
const xmlString = [
|
|
396
|
+
'<?xml version="1.0"?>',
|
|
397
|
+
'<Root>',
|
|
398
|
+
' <Child</Child>',
|
|
399
|
+
'</Root>',
|
|
400
|
+
].join('\n');
|
|
401
|
+
const doc = XmlUtils.parseXmlString(xmlString, 'Root');
|
|
402
|
+
expect(doc).toBeNull();
|
|
403
|
+
});
|
|
404
|
+
|
|
405
|
+
it('returns null on root element mismatch', () => {
|
|
406
|
+
const xmlString = [
|
|
407
|
+
'<?xml version="1.0"?>',
|
|
408
|
+
'<Root>',
|
|
409
|
+
' <Child></Child>',
|
|
410
|
+
'</Root>',
|
|
411
|
+
].join('\n');
|
|
412
|
+
const doc = XmlUtils.parseXmlString(xmlString, 'Document');
|
|
413
|
+
expect(doc).toBeNull();
|
|
414
|
+
});
|
|
415
|
+
|
|
416
|
+
it('returns null on XML that embeds HTML', () => {
|
|
417
|
+
const xmlString = [
|
|
418
|
+
'<?xml version="1.0"?>',
|
|
419
|
+
'<Root>',
|
|
420
|
+
' <Child xmlns="http://www.w3.org/1999/xhtml"></Child>',
|
|
421
|
+
'</Root>',
|
|
422
|
+
].join('\n');
|
|
423
|
+
const doc = XmlUtils.parseXmlString(xmlString, 'Root');
|
|
424
|
+
expect(doc).toBeNull();
|
|
425
|
+
});
|
|
426
|
+
|
|
427
|
+
it('returns null on XML that embeds SVG', () => {
|
|
428
|
+
const xmlString = [
|
|
429
|
+
'<?xml version="1.0"?>',
|
|
430
|
+
'<Root>',
|
|
431
|
+
' <Child xmlns="http://www.w3.org/2000/svg"></Child>',
|
|
432
|
+
'</Root>',
|
|
433
|
+
].join('\n');
|
|
434
|
+
const doc = XmlUtils.parseXmlString(xmlString, 'Root');
|
|
435
|
+
expect(doc).toBeNull();
|
|
436
|
+
});
|
|
437
|
+
});
|
|
374
438
|
});
|
|
375
439
|
|