Skip to content

Commit

Permalink
Revert "fix(fairplay): Re-add initDataTransform config (shaka-project…
Browse files Browse the repository at this point in the history
…#4231)"

This reverts commit 9a6f150.
  • Loading branch information
nyanmisaka committed Oct 6, 2022
1 parent d711334 commit 0696d16
Show file tree
Hide file tree
Showing 4 changed files with 2 additions and 33 deletions.
3 changes: 2 additions & 1 deletion docs/tutorials/upgrade.md
Expand Up @@ -42,7 +42,8 @@ application:
`manifest.defaultPresentationDelay` (deprecated in v3.0.0)
- Configuration of factories should be plain factory functions, not
constructors; these will not be invoked with `new` (deprecated in v3.1.0)
- `drm.initDataTransform` now defaults to a no-op
- `drm.initDataTransform` has been removed (no longer needed since the
minimum supported version of iOS is now 13)
- `streaming.smallGapLimit` and `streaming.jumpLargeGaps` have been removed;
all gaps will now be jumped
- `manifest.hls.useFullSegmentsForStartTime` has been removed; this setting
Expand Down
11 changes: 0 additions & 11 deletions externs/shaka/player.js
Expand Up @@ -618,9 +618,6 @@ shaka.extern.AdvancedDrmConfiguration;
* clearKeys: !Object.<string, string>,
* delayLicenseRequestUntilPlayed: boolean,
* advanced: Object.<string, shaka.extern.AdvancedDrmConfiguration>,
* initDataTransform:
* ((function(!Uint8Array, string, ?shaka.extern.DrmInfo):!Uint8Array)|
* undefined),
* logLicenseExchange: boolean,
* updateExpirationTime: number,
* preferredKeySystems: !Array.<string>
Expand All @@ -644,14 +641,6 @@ shaka.extern.AdvancedDrmConfiguration;
* <i>Optional.</i> <br>
* A dictionary which maps key system IDs to advanced DRM configuration for
* those key systems.
* @property
* {((function(!Uint8Array, string, ?shaka.extern.DrmInfo):!Uint8Array)|
* undefined)}
* initDataTransform
* <i>Optional.</i><br>
* If given, this function is called with the init data from the
* manifest/media and should return the (possibly transformed) init data to
* pass to the browser.
* @property {boolean} logLicenseExchange
* <i>Optional.</i><br>
* If set to <code>true</code>, prints logs containing the license exchange.
Expand Down
16 changes: 0 additions & 16 deletions lib/media/drm_engine.js
Expand Up @@ -1253,22 +1253,6 @@ shaka.media.DrmEngine = class {
};
this.activeSessions_.set(session, metadata);

try {
initData = this.config_.initDataTransform(
initData, initDataType, this.currentDrmInfo_);
} catch (error) {
let shakaError = error;
if (!(error instanceof shaka.util.Error)) {
shakaError = new shaka.util.Error(
shaka.util.Error.Severity.CRITICAL,
shaka.util.Error.Category.DRM,
shaka.util.Error.Code.INIT_DATA_TRANSFORM_ERROR,
error);
}
this.onError_(shakaError);
return;
}

if (this.config_.logLicenseExchange) {
const str = shaka.util.Uint8ArrayUtils.toBase64(initData);
shaka.log.info('EME init data: type=', initDataType, 'data=', str);
Expand Down
5 changes: 0 additions & 5 deletions lib/util/player_configuration.js
Expand Up @@ -66,11 +66,6 @@ shaka.util.PlayerConfiguration = class {
clearKeys: {}, // key is arbitrary key system ID, value must be string
advanced: {}, // key is arbitrary key system ID, value is a record type
delayLicenseRequestUntilPlayed: false,
initDataTransform: (initData, initDataType, drmInfo) => {
return shaka.util.ConfigUtils.referenceParametersAndReturn(
[initData, initDataType, drmInfo],
initData);
},
logLicenseExchange: false,
updateExpirationTime: 1,
preferredKeySystems: [],
Expand Down

0 comments on commit 0696d16

Please sign in to comment.