Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

test: Drop Axinom DRM servers from tests #5186

Merged
merged 1 commit into from
Apr 26, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 4 additions & 17 deletions test/media/drm_engine_integration.js
Original file line number Diff line number Diff line change
Expand Up @@ -74,19 +74,6 @@ describe('DrmEngine', () => {
onEventSpy = jasmine.createSpy('onEvent');

networkingEngine = new shaka.net.NetworkingEngine();
networkingEngine.registerRequestFilter((type, request) => {
if (type != shaka.net.NetworkingEngine.RequestType.LICENSE) {
return;
}

request.headers['X-AxDRM-Message'] = [
'eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ2ZXJzaW9uIjoxLCJjb21fa2V5X2lk',
'IjoiNjllNTQwODgtZTllMC00NTMwLThjMWEtMWViNmRjZDBkMTRlIiwibWVzc2FnZSI6e',
'yJ0eXBlIjoiZW50aXRsZW1lbnRfbWVzc2FnZSIsImtleXMiOlt7ImlkIjoiNmU1YTFkMj',
'YtMjc1Ny00N2Q3LTgwNDYtZWFhNWQxZDM0YjVhIn1dfX0.yF7PflOPv9qHnu3ZWJNZ12j',
'gkqTabmwXbDWk_47tLNE',
].join('');
});

const playerInterface = {
netEngine: networkingEngine,
Expand All @@ -99,22 +86,22 @@ describe('DrmEngine', () => {
drmEngine = new shaka.media.DrmEngine(playerInterface);
const config = shaka.util.PlayerConfiguration.createDefault().drm;
config.servers['com.widevine.alpha'] =
'https://drm-widevine-licensing.axtest.net/AcquireLicense';
'https://cwip-shaka-proxy.appspot.com/specific_key?blodJidXR9eARuql0dNLWg=GX8m9XLIZNIzizrl0RTqnA';
config.servers['com.microsoft.playready'] =
'https://drm-playready-licensing.axtest.net/AcquireLicense';
'https://test.playready.microsoft.com/service/rightsmanager.asmx?cfg=(kid:6e5a1d26-2757-47d7-8046-eaa5d1d34b5a,contentkey:GX8m9XLIZNIzizrl0RTqnA,sl:150)';
drmEngine.configure(config);

manifest = shaka.test.ManifestGenerator.generate((manifest) => {
manifest.addVariant(0, (variant) => {
variant.addVideo(1, (stream) => {
stream.encrypted = true;
stream.addDrmInfo('com.widevine.alpha');
stream.addDrmInfo('com.microsoft.playready');
stream.addDrmInfo('com.widevine.alpha');
});
variant.addAudio(2, (stream) => {
stream.encrypted = true;
stream.addDrmInfo('com.widevine.alpha');
stream.addDrmInfo('com.microsoft.playready');
stream.addDrmInfo('com.widevine.alpha');
});
});
});
Expand Down
23 changes: 9 additions & 14 deletions test/test/util/test_scheme.js
Original file line number Diff line number Diff line change
Expand Up @@ -455,6 +455,7 @@ const widevineDrmServers = {

/** @type {AVMetadataType} */
const axinomMultiDrmVideoSegment = {
// Taken from Axinom's v6 test vector.
initSegmentUri: '/base/test/test/assets/multidrm-video-init.mp4',
mdhdOffset: 0x1d1,
segmentUri: '/base/test/test/assets/multidrm-video-segment.mp4',
Expand All @@ -469,6 +470,7 @@ const axinomMultiDrmVideoSegment = {

/** @type {AVMetadataType} */
const axinomMultiDrmAudioSegment = {
// Taken from Axinom's v6 test vector.
initSegmentUri: '/base/test/test/assets/multidrm-audio-init.mp4',
mdhdOffset: 0x192,
segmentUri: '/base/test/test/assets/multidrm-audio-segment.mp4',
Expand All @@ -483,20 +485,15 @@ const axinomMultiDrmAudioSegment = {

/** @type {!Object.<string, string>} */
const axinomDrmServers = {
// NOTE: These are not Axinom's actual servers. These are test servers for
// Widevine and PlayReady that let us specify the known key IDs and keys for
// Axinom's v6 test vectors. Axinom's own servers started returning 403
// errors for these older test vectors, and we were forced to switch to
// something stable and independent.
'com.widevine.alpha':
'https://drm-widevine-licensing.axtest.net/AcquireLicense',
'https://cwip-shaka-proxy.appspot.com/specific_key?blodJidXR9eARuql0dNLWg=GX8m9XLIZNIzizrl0RTqnA',
'com.microsoft.playready':
'https://drm-playready-licensing.axtest.net/AcquireLicense',
};

/** @type {!Object.<string, string>} */
const axinomDrmHeaders = {
'X-AxDRM-Message':
'eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ2ZXJzaW9uIjoxLCJjb21fa2V5' +
'X2lkIjoiNjllNTQwODgtZTllMC00NTMwLThjMWEtMWViNmRjZDBkMTRlIiwibWVzc' +
'2FnZSI6eyJ0eXBlIjoiZW50aXRsZW1lbnRfbWVzc2FnZSIsImtleXMiOlt7ImlkIj' +
'oiNmU1YTFkMjYtMjc1Ny00N2Q3LTgwNDYtZWFhNWQxZDM0YjVhIn1dfX0.yF7PflO' +
'Pv9qHnu3ZWJNZ12jgkqTabmwXbDWk_47tLNE',
'https://test.playready.microsoft.com/service/rightsmanager.asmx?cfg=(kid:6e5a1d26-2757-47d7-8046-eaa5d1d34b5a,contentkey:GX8m9XLIZNIzizrl0RTqnA,sl:150)',
};

/** @type {TextMetadataType} */
Expand Down Expand Up @@ -614,7 +611,6 @@ shaka.test.TestScheme.DATA = {
audio: axinomMultiDrmAudioSegment,
text: vttSegment,
licenseServers: axinomDrmServers,
licenseRequestHeaders: axinomDrmHeaders,
duration: 30,
},

Expand All @@ -626,7 +622,6 @@ shaka.test.TestScheme.DATA = {
initData: undefined,
}),
licenseServers: axinomDrmServers,
licenseRequestHeaders: axinomDrmHeaders,
duration: 30,
},

Expand Down