mirror of
https://github.com/shaka-project/shaka-player.git
synced 2026-06-14 15:56:38 +03:00
fix(dash): Fix performance regression (#4064)
See: https://github.com/shaka-project/shaka-player/issues/4062#issuecomment-1077826210
This commit is contained in:
committed by
GitHub
parent
89409cee3e
commit
298b60481d
@@ -74,9 +74,8 @@ shaka.util.Uint8ArrayUtils = class {
|
||||
// byte.
|
||||
const bytes = window.atob(str.replace(/-/g, '+').replace(/_/g, '/'));
|
||||
const result = new Uint8Array(bytes.length);
|
||||
const enumerate = (it) => shaka.util.Iterables.enumerate(it);
|
||||
for (const {i, item} of enumerate(bytes)) {
|
||||
result[i] = item.charCodeAt(0);
|
||||
for (let i = 0; i < bytes.length; ++i) {
|
||||
result[i] = bytes.charCodeAt(i);
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user