mirror of
https://github.com/shaka-project/shaka-player.git
synced 2026-06-17 16:26:39 +03:00
34cde38108
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 #2528 Change-Id: I32c4617b14a30c412d5bc532ec17a46fdc1fea1a