mirror of
https://github.com/shaka-project/shaka-player.git
synced 2026-06-15 16:06:41 +03:00
d5b1863157
On Edge, to properly play mixed content, we need to insert init segment twice for clear part - once as encrypted, and immediately again as clear. Otherwise we may encounter green screen and errors from video decoder. Co-authored-by: Joey Parrish <joeyparrish@users.noreply.github.com> Co-authored-by: Nick Michael <nick-michael@users.noreply.github.com> Co-authored-by: Álvaro Velad Galván <ladvan91@hotmail.com> Co-authored-by: Casey Occhialini <1508707+littlespex@users.noreply.github.com>
46 lines
1.6 KiB
JavaScript
46 lines
1.6 KiB
JavaScript
/*! @license
|
|
* Shaka Player
|
|
* Copyright 2016 Google LLC
|
|
* SPDX-License-Identifier: Apache-2.0
|
|
*/
|
|
|
|
describe('DrmUtils', () => {
|
|
describe('isPlayReadyKeySystem', () => {
|
|
it('should return true for MS & Chromecast PlayReady', () => {
|
|
expect(shaka.util.DrmUtils.isPlayReadyKeySystem(
|
|
'com.microsoft.playready')).toBe(true);
|
|
expect(shaka.util.DrmUtils.isPlayReadyKeySystem(
|
|
'com.microsoft.playready.anything')).toBe(true);
|
|
expect(shaka.util.DrmUtils.isPlayReadyKeySystem(
|
|
'com.chromecast.playready')).toBe(true);
|
|
});
|
|
|
|
it('should return false for non-PlayReady key systems', () => {
|
|
expect(shaka.util.DrmUtils.isPlayReadyKeySystem(
|
|
'com.widevine.alpha')).toBe(false);
|
|
expect(shaka.util.DrmUtils.isPlayReadyKeySystem(
|
|
'com.abc.playready')).toBe(false);
|
|
});
|
|
});
|
|
|
|
describe('isFairPlayKeySystem', () => {
|
|
it('should return true for FairPlay', () => {
|
|
expect(shaka.util.DrmUtils.isFairPlayKeySystem(
|
|
'com.apple.fps')).toBe(true);
|
|
expect(shaka.util.DrmUtils.isFairPlayKeySystem(
|
|
'com.apple.fps.1_0')).toBe(true);
|
|
expect(shaka.util.DrmUtils.isFairPlayKeySystem(
|
|
'com.apple.fps.2_0')).toBe(true);
|
|
expect(shaka.util.DrmUtils.isFairPlayKeySystem(
|
|
'com.apple.fps.3_0')).toBe(true);
|
|
});
|
|
|
|
it('should return false for non-FairPlay key systems', () => {
|
|
expect(shaka.util.DrmUtils.isFairPlayKeySystem(
|
|
'com.widevine.alpha')).toBe(false);
|
|
expect(shaka.util.DrmUtils.isFairPlayKeySystem(
|
|
'com.abc.playready')).toBe(false);
|
|
});
|
|
});
|
|
});
|