Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit bd8045b

Browse files
committedApr 9, 2025·
Rename mediaKeySystemConfiguration to just keySystemConfiguration
1 parent a0197bb commit bd8045b

13 files changed

+30
-32
lines changed
 

‎doc/api/Player_Errors.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -395,8 +395,8 @@ They have the following properties:
395395
Note that it is not set for some errors for which it wouldn't make sense, such as for
396396
`EncryptedMediaError` instances with the `code` `MEDIA_IS_ENCRYPTED_ERROR`.
397397

398-
- `mediaKeySystemConfiguration` (`MediaKeySystemAccessConfiguration | undefined`): If
399-
known, the
398+
- `keySystemConfiguration` (`MediaKeySystemAccessConfiguration | undefined`): If known,
399+
the
400400
[`MediaKeySystemAccessConfiguration`](https://developer.mozilla.org/en-US/docs/Web/API/MediaKeySystemAccess/getConfiguration)
401401
of the `MediaKeySystemAccess` that encountered the error. This might be useful to for
402402
example be able to check the key system's robustness (e.g. PlayReady SL3000 vs SL2000,

‎src/errors/__tests__/encrypted_media_error.test.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ describe("errors - EncryptedMediaError", () => {
99
reason,
1010
{
1111
keyStatuses: undefined,
12-
mediaKeySystemAccessConfiguration: undefined,
12+
keySystemConfiguration: undefined,
1313
keySystem: undefined,
1414
},
1515
);
@@ -28,7 +28,7 @@ describe("errors - EncryptedMediaError", () => {
2828
reason,
2929
{
3030
keyStatuses: undefined,
31-
mediaKeySystemAccessConfiguration: undefined,
31+
keySystemConfiguration: undefined,
3232
keySystem: undefined,
3333
},
3434
);

‎src/errors/__tests__/is_known_error.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ describe("Errors - isKnownError", () => {
3838
"toto",
3939
{
4040
keyStatuses: undefined,
41-
mediaKeySystemAccessConfiguration: undefined,
41+
keySystemConfiguration: undefined,
4242
keySystem: undefined,
4343
},
4444
);

‎src/errors/encrypted_media_error.ts

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ export default class EncryptedMediaError extends Error {
3030
public readonly type: "ENCRYPTED_MEDIA_ERROR";
3131
public readonly code: IEncryptedMediaErrorCode;
3232
public readonly keyStatuses: IEncryptedMediaErrorKeyStatusObject[] | undefined;
33-
public readonly mediaKeySystemConfiguration: MediaKeySystemConfiguration | undefined;
33+
public readonly keySystemConfiguration: MediaKeySystemConfiguration | undefined;
3434
public readonly keySystem: string | undefined;
3535
public fatal: boolean;
3636
private _originalMessage: string;
@@ -44,7 +44,7 @@ export default class EncryptedMediaError extends Error {
4444
reason: string,
4545
supplementaryInfos: {
4646
keyStatuses: IEncryptedMediaErrorKeyStatusObject[];
47-
mediaKeySystemAccessConfiguration: MediaKeySystemConfiguration;
47+
keySystemConfiguration: MediaKeySystemConfiguration;
4848
keySystem: string;
4949
},
5050
);
@@ -59,7 +59,7 @@ export default class EncryptedMediaError extends Error {
5959
reason: string,
6060
supplementaryInfos: {
6161
keyStatuses: undefined;
62-
mediaKeySystemAccessConfiguration: MediaKeySystemConfiguration;
62+
keySystemConfiguration: MediaKeySystemConfiguration;
6363
keySystem: string;
6464
},
6565
);
@@ -68,7 +68,7 @@ export default class EncryptedMediaError extends Error {
6868
reason: string,
6969
supplementaryInfos: {
7070
keyStatuses: undefined;
71-
mediaKeySystemAccessConfiguration: undefined;
71+
keySystemConfiguration: undefined;
7272
keySystem: undefined;
7373
},
7474
);
@@ -77,7 +77,7 @@ export default class EncryptedMediaError extends Error {
7777
reason: string,
7878
supplementaryInfos: {
7979
keyStatuses: IEncryptedMediaErrorKeyStatusObject[] | undefined;
80-
mediaKeySystemAccessConfiguration: MediaKeySystemConfiguration | undefined;
80+
keySystemConfiguration: MediaKeySystemConfiguration | undefined;
8181
keySystem: string | undefined;
8282
},
8383
) {
@@ -93,8 +93,7 @@ export default class EncryptedMediaError extends Error {
9393
this.fatal = false;
9494

9595
this.keyStatuses = supplementaryInfos.keyStatuses;
96-
this.mediaKeySystemConfiguration =
97-
supplementaryInfos.mediaKeySystemAccessConfiguration;
96+
this.keySystemConfiguration = supplementaryInfos.keySystemConfiguration;
9897
this.keySystem = supplementaryInfos.keySystem;
9998
}
10099

@@ -110,7 +109,7 @@ export default class EncryptedMediaError extends Error {
110109
code: this.code,
111110
reason: this._originalMessage,
112111
keyStatuses: this.keyStatuses,
113-
mediaKeySystemConfiguration: this.mediaKeySystemConfiguration,
112+
keySystemConfiguration: this.keySystemConfiguration,
114113
keySystem: this.keySystem,
115114
};
116115
}
@@ -126,6 +125,6 @@ export interface ISerializedEncryptedMediaError {
126125
keyId: ArrayBuffer;
127126
}>
128127
| undefined;
129-
mediaKeySystemConfiguration: MediaKeySystemConfiguration | undefined;
128+
keySystemConfiguration: MediaKeySystemConfiguration | undefined;
130129
keySystem: string | undefined;
131130
}

‎src/main_thread/decrypt/content_decryptor.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -721,7 +721,7 @@ export default class ContentDecryptor extends EventEmitter<IContentDecryptorEven
721721
error instanceof Error ? error.toString() : "Unknown error",
722722
{
723723
keyStatuses: undefined,
724-
mediaKeySystemAccessConfiguration: mediaKeySystemAccess.getConfiguration(),
724+
keySystemConfiguration: mediaKeySystemAccess.getConfiguration(),
725725
keySystem: mediaKeySystemAccess.keySystem,
726726
},
727727
);

‎src/main_thread/decrypt/find_key_system.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -465,7 +465,7 @@ export default function getMediaKeySystemAccess(
465465
"browser.",
466466
{
467467
keyStatuses: undefined,
468-
mediaKeySystemAccessConfiguration: undefined,
468+
keySystemConfiguration: undefined,
469469
keySystem: undefined,
470470
},
471471
);

‎src/main_thread/decrypt/get_media_keys.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -159,7 +159,7 @@ async function createMediaKeys(
159159
error instanceof Error ? error.message : "Unknown error when creating MediaKeys.";
160160
throw new EncryptedMediaError("CREATE_MEDIA_KEYS_ERROR", message, {
161161
keyStatuses: undefined,
162-
mediaKeySystemAccessConfiguration: mediaKeySystemAccess.getConfiguration(),
162+
keySystemConfiguration: mediaKeySystemAccess.getConfiguration(),
163163
keySystem: mediaKeySystemAccess.keySystem,
164164
});
165165
}

‎src/main_thread/decrypt/session_events_listener.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ export default function SessionEventsListener(
7777
callbacks.onError(
7878
new EncryptedMediaError("KEY_ERROR", (evt as Event).type, {
7979
keyStatuses: undefined,
80-
mediaKeySystemAccessConfiguration: mediaKeySystemAccess.getConfiguration(),
80+
keySystemConfiguration: mediaKeySystemAccess.getConfiguration(),
8181
keySystem: mediaKeySystemAccess.keySystem,
8282
}),
8383
);
@@ -287,7 +287,7 @@ function formatGetLicenseError(
287287
"The license server took too much time to " + "respond.",
288288
{
289289
keyStatuses: undefined,
290-
mediaKeySystemAccessConfiguration: mediaKeySystemAccess.getConfiguration(),
290+
keySystemConfiguration: mediaKeySystemAccess.getConfiguration(),
291291
keySystem: mediaKeySystemAccess.keySystem,
292292
},
293293
);
@@ -298,7 +298,7 @@ function formatGetLicenseError(
298298
"An error occured when calling `getLicense`.",
299299
{
300300
keyStatuses: undefined,
301-
mediaKeySystemAccessConfiguration: mediaKeySystemAccess.getConfiguration(),
301+
keySystemConfiguration: mediaKeySystemAccess.getConfiguration(),
302302
keySystem: mediaKeySystemAccess.keySystem,
303303
},
304304
);
@@ -332,7 +332,7 @@ async function updateSessionWithMessage(
332332
const reason = error instanceof Error ? error.toString() : "`session.update` failed";
333333
throw new EncryptedMediaError("KEY_UPDATE_ERROR", reason, {
334334
keyStatuses: undefined,
335-
mediaKeySystemAccessConfiguration: mediaKeySystemAccess.getConfiguration(),
335+
keySystemConfiguration: mediaKeySystemAccess.getConfiguration(),
336336
keySystem: mediaKeySystemAccess.keySystem,
337337
});
338338
}

‎src/main_thread/decrypt/set_server_certificate.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ async function setServerCertificate(
6060
error instanceof Error ? error.toString() : "`setServerCertificate` error";
6161
throw new EncryptedMediaError("LICENSE_SERVER_CERTIFICATE_ERROR", reason, {
6262
keyStatuses: undefined,
63-
mediaKeySystemAccessConfiguration: mediaKeySystemAccess.getConfiguration(),
63+
keySystemConfiguration: mediaKeySystemAccess.getConfiguration(),
6464
keySystem: mediaKeySystemAccess.keySystem,
6565
});
6666
}
@@ -120,7 +120,7 @@ export default async function trySettingServerCertificate(
120120
"Unknown error when setting the server certificate.",
121121
{
122122
keyStatuses: undefined,
123-
mediaKeySystemAccessConfiguration: mediaKeySystemAccess.getConfiguration(),
123+
keySystemConfiguration: mediaKeySystemAccess.getConfiguration(),
124124
keySystem: mediaKeySystemAccess.keySystem,
125125
},
126126
);

‎src/main_thread/decrypt/utils/check_key_statuses.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,7 @@ export default function checkKeyStatuses(
130130
{
131131
keyStatuses: [keyStatusObj, ...badKeyStatuses],
132132
keySystem: mediaKeySystemAccess.keySystem,
133-
mediaKeySystemAccessConfiguration: mediaKeySystemAccess.getConfiguration(),
133+
keySystemConfiguration: mediaKeySystemAccess.getConfiguration(),
134134
},
135135
);
136136

@@ -167,7 +167,7 @@ export default function checkKeyStatuses(
167167
{
168168
keyStatuses: [keyStatusObj, ...badKeyStatuses],
169169
keySystem: mediaKeySystemAccess.keySystem,
170-
mediaKeySystemAccessConfiguration: mediaKeySystemAccess.getConfiguration(),
170+
keySystemConfiguration: mediaKeySystemAccess.getConfiguration(),
171171
},
172172
);
173173
switch (onKeyInternalError) {
@@ -203,7 +203,7 @@ export default function checkKeyStatuses(
203203
{
204204
keyStatuses: [keyStatusObj, ...badKeyStatuses],
205205
keySystem: mediaKeySystemAccess.keySystem,
206-
mediaKeySystemAccessConfiguration: mediaKeySystemAccess.getConfiguration(),
206+
keySystemConfiguration: mediaKeySystemAccess.getConfiguration(),
207207
},
208208
);
209209
switch (onKeyOutputRestricted) {
@@ -245,7 +245,7 @@ export default function checkKeyStatuses(
245245
{
246246
keyStatuses: badKeyStatuses,
247247
keySystem: mediaKeySystemAccess.keySystem,
248-
mediaKeySystemAccessConfiguration: mediaKeySystemAccess.getConfiguration(),
248+
keySystemConfiguration: mediaKeySystemAccess.getConfiguration(),
249249
},
250250
);
251251
}

‎src/main_thread/decrypt/utils/media_keys_attacher.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -257,8 +257,7 @@ async function attachMediaKeys(
257257
"Could not attach the MediaKeys to the media element: " + errMessage,
258258
{
259259
keyStatuses: undefined,
260-
mediaKeySystemAccessConfiguration:
261-
mediaKeysInfo.mediaKeySystemAccess.getConfiguration(),
260+
keySystemConfiguration: mediaKeysInfo.mediaKeySystemAccess.getConfiguration(),
262261
keySystem: mediaKeysInfo.mediaKeySystemAccess.keySystem,
263262
},
264263
);

‎src/main_thread/init/multi_thread_content_initializer.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1248,7 +1248,7 @@ export default class MultiThreadContentInitializer extends ContentInitializer {
12481248
stopListening();
12491249
const err = new EncryptedMediaError("MEDIA_IS_ENCRYPTED_ERROR", errMsg, {
12501250
keyStatuses: undefined,
1251-
mediaKeySystemAccessConfiguration: undefined,
1251+
keySystemConfiguration: undefined,
12521252
keySystem: undefined,
12531253
});
12541254
this._onFatalError(err);
@@ -2111,7 +2111,7 @@ function formatWorkerError(sentError: ISentError): IPlayerError {
21112111
// eslint-disable-next-line @typescript-eslint/no-unsafe-argument
21122112
return new EncryptedMediaError(sentError.code, sentError.reason, {
21132113
keyStatuses: sentError.keyStatuses,
2114-
mediaKeySystemAccessConfiguration: sentError.mediaKeySystemConfiguration,
2114+
keySystemConfiguration: sentError.keySystemConfiguration,
21152115
keySystem: sentError.keySystem,
21162116
// eslint-disable-next-line @typescript-eslint/no-explicit-any
21172117
} as any);

‎src/main_thread/init/utils/initialize_content_decryption.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -157,7 +157,7 @@ export default function initializeContentDecryption(
157157
} {
158158
const err = new EncryptedMediaError("MEDIA_IS_ENCRYPTED_ERROR", errMsg, {
159159
keyStatuses: undefined,
160-
mediaKeySystemAccessConfiguration: undefined,
160+
keySystemConfiguration: undefined,
161161
keySystem: undefined,
162162
});
163163
const ref = new SharedReference({

0 commit comments

Comments
 (0)
Please sign in to comment.