mirror of
https://github.com/shaka-project/shaka-player.git
synced 2026-06-14 15:56:38 +03:00
Clean up EBML size constants
Instead of using an array of Uint8Arrays, which could trigger a load-time failure on very old browsers, store an array of number arrays. This is equivalent for the purpose of comparison, and it cannot fail at load-time. This cleanup seems to fix minor test flake in the EBML parser tests that was observed with upgraded node modules. Issue #1694 Change-Id: I87b2307bceddb3a21dfc81d4fe9828afd9508617
This commit is contained in:
@@ -109,8 +109,11 @@ shaka.util.Uint8ArrayUtils.toHex = function(arr) {
|
||||
|
||||
/**
|
||||
* Compare two Uint8Arrays for equality.
|
||||
* @param {Uint8Array} arr1
|
||||
* @param {Uint8Array} arr2
|
||||
* For convenience, this also accepts Arrays, so that one can trivially compare
|
||||
* a Uint8Array to an Array of numbers.
|
||||
*
|
||||
* @param {(Uint8Array|Array.<number>)} arr1
|
||||
* @param {(Uint8Array|Array.<number>)} arr2
|
||||
* @return {boolean}
|
||||
* @export
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user