Skip to content
This repository has been archived by the owner on Mar 1, 2024. It is now read-only.

Commit

Permalink
Merge pull request #18 from make-live/fix-syntax-errors
Browse files Browse the repository at this point in the history
Fix syntax errors
  • Loading branch information
mentalnote authored Jul 25, 2022
2 parents 63f5ca3 + 4fee8a4 commit 7155765
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions SignallingWebServer/scripts/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ function scanGamepads() {
function updateStatus() {
scanGamepads();
// Iterate over multiple controllers in the case the mutiple gamepads are connected
for (j in controllers) {
for (let j in controllers) {
let controller = controllers[j];
let currentState = controller.currentState;
let prevState = controller.prevState;
Expand Down Expand Up @@ -464,7 +464,7 @@ var streamTrackSource = null;

function updateStreamList() {
const streamSelector = document.getElementById('stream-select');
for (i = streamSelector.options.length - 1; i >= 0; i--) {
for (let i = streamSelector.options.length - 1; i >= 0; i--) {
streamSelector.remove(i);
}
streamSelector.value = null;
Expand All @@ -485,7 +485,7 @@ function updateTrackList() {
const streamSelector = document.getElementById('stream-select');
const trackSelector = document.getElementById('track-select');
const stream = webRtcPlayerObj.availableVideoStreams.get(streamSelector.value);
for (i = trackSelector.options.length - 1; i >= 0; i--) {
for (let i = trackSelector.options.length - 1; i >= 0; i--) {
trackSelector.remove(i);
}
trackSelector.value = null;
Expand Down Expand Up @@ -699,7 +699,7 @@ function addResponseEventListener(name, listener) {
}

function removeResponseEventListener(name) {
responseEventListeners.remove(name);
responseEventListeners.delete(name);
}

// Must be kept in sync with PixelStreamingProtocol::EToPlayerMsg C++ enum.
Expand Down Expand Up @@ -1551,7 +1551,7 @@ function emitDescriptor(messageType, descriptor) {
byteIdx++;
data.setUint16(byteIdx, descriptorAsString.length, true);
byteIdx += 2;
for (i = 0; i < descriptorAsString.length; i++) {
for (let i = 0; i < descriptorAsString.length; i++) {
data.setUint16(byteIdx, descriptorAsString.charCodeAt(i), true);
byteIdx += 2;
}
Expand Down Expand Up @@ -1592,6 +1592,7 @@ function requestQualityControl() {
let playerElementClientRect = undefined;
let normalizeAndQuantizeUnsigned = undefined;
let normalizeAndQuantizeSigned = undefined;
let unquantizeAndDenormalizeUnsigned = undefined;

function setupNormalizeAndQuantize() {
let playerElement = document.getElementById('player');
Expand Down

0 comments on commit 7155765

Please sign in to comment.