Files
ShakaPlayer/test/media/manifest_parser_unit.js
Álvaro Velad Galván 4f62ce8b24 build: Reduce bundle size by deduplicating license headers (#10182)
Ensure generated bundles contain a single license header instead of
repeating the same notice across bundled modules.

Normalize all copyright years to 2016 and remove
duplicate license headers from generated bundles.

This reduces the final bundle size while preserving license information
in the distributed artifacts.
2026-06-05 12:43:28 +02:00

38 lines
1.0 KiB
JavaScript

/*! @license
* Shaka Player
* Copyright 2016 Google LLC
* SPDX-License-Identifier: Apache-2.0
*/
describe('ManifestParser', () => {
const ManifestParser = shaka.media.ManifestParser;
describe('isSupported', () => {
const testMimeTypeLowercase = 'application/x-test-type';
let testFactory;
beforeEach(() => {
testFactory = /** @type {shaka.extern.ManifestParser.Factory} */ (() => {
return /** @type {shaka.extern.ManifestParser} */ ({});
});
ManifestParser.registerParserByMime(testMimeTypeLowercase, testFactory);
// Skip test if MediaSource is not supported (native playback mode)
if (!deviceDetected.supportsMediaSource()) {
pending('MediaSource not supported on this platform');
}
});
afterEach(() => {
ManifestParser.unregisterParserByMime(testMimeTypeLowercase);
});
it('returns false for unregistered MIME types', () => {
expect(ManifestParser.isSupported('application/x-unknown')).toBe(false);
});
});
});