mirror of
https://github.com/shaka-project/shaka-player.git
synced 2026-06-26 17:46:26 +03:00
Add utility for looping from 0 to n.
Closes #1518 Change-Id: I865f7a0311516d04ae84532dab873e1aaa31eb24
This commit is contained in:
@@ -110,7 +110,7 @@ shaka.util.StringUtils = class {
|
||||
const length = Math.floor(data.byteLength / 2);
|
||||
const arr = new Uint16Array(length);
|
||||
const dataView = new DataView(buffer);
|
||||
for (let i = 0; i < length; i++) {
|
||||
for (const i of shaka.util.Iterables.range(length)) {
|
||||
arr[i] = dataView.getUint16(i * 2, littleEndian);
|
||||
}
|
||||
return shaka.util.StringUtils.fromCharCode(arr);
|
||||
|
||||
Reference in New Issue
Block a user