forked from shaka-project/shaka-player
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix type info and initData types in EME polyfills
The latest Closure Compiler initially complained about "initData" not being a known property of "Event". Correcting the type to MediaEncryptedEvent exposed a potential bug, which is that we were assigning Uint8Array in some cases instead of the correct ArrayBuffer. This fixes both the type of the event and converts the Uint8Arrays to ArrayBuffers. This also works around a complaint about "code" on "Error". We use "Error" objects as look-alikes for DOMException because there is no exposed constructor for DOMExceptions. To satisfy the compiler, we use square brackets now to set the "code" field on these DOMException look-alikes. Finally, this removes the "method" field on certain Errors in the WebKit EME polyfill. These must have been leftover from some debugging, and are not used at all. Issue shaka-project#2528 Change-Id: I32c4617b14a30c412d5bc532ec17a46fdc1fea1a
- Loading branch information
1 parent
15e48e9
commit 34cde38
Showing
3 changed files
with
40 additions
and
22 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters