Skip to content

Commit

Permalink
Version 45:
Browse files Browse the repository at this point in the history
* Fixed problems encountered if the browser tab is inactive while the UI loads.
  • Loading branch information
bp2008 committed Jul 17, 2018
1 parent ff91bcb commit b6d7961
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 9 deletions.
2 changes: 1 addition & 1 deletion ui3.htm
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
};
</script>
<script type="text/javascript">
var ui_version = "44";
var ui_version = "45";
var bi_version = "%%VERSION%%";
var combined_version = ui_version + "-" + bi_version;
//if (!!navigator.userAgent.match(/ Android /))
Expand Down
17 changes: 9 additions & 8 deletions ui3/ui3.js
Original file line number Diff line number Diff line change
Expand Up @@ -8217,7 +8217,7 @@ function CameraListLoader()
{
if (cameraListUpdateTimeout != null)
clearTimeout(cameraListUpdateTimeout);
if (documentIsHidden())
if (documentIsHidden() && lastResponse !== null && typeof successCallbackFunc !== "function")
{
cameraListUpdateTimeout = setTimeout(function ()
{
Expand Down Expand Up @@ -9797,11 +9797,6 @@ function FetchH264VideoModule()
}, 5);
return;
}
if (documentIsHidden())
{
console.log("Denying OpenVideo command because the page is believed to be inactive.");
return;
}
if (developerMode)
console.log("h264.OpenVideo");
var isSameClipAsBefore = AreSameClip(loading.uniqueId, videoData.uniqueId);
Expand Down Expand Up @@ -9936,6 +9931,12 @@ function FetchH264VideoModule()
}
var acceptFrame = function (frame, streams)
{
if (documentIsHidden())
{
console.log("Stopping H.264 stream because the page is believed to be inactive.");
StopStreaming();
return;
}
if (streamHasAudio === 0 && didRequestAudio && streams !== 2)
{
// We requested audio, but the stream says it doesn't contain any.
Expand Down Expand Up @@ -10806,12 +10807,12 @@ function Pnacl_Player($startingContainer, frameRendered, PlaybackReachedNaturalE
//}
else
{
console.log(message_event.data);
console.log("NaCl Player Message: " + message_event.data);
}
}
else
{
console.log("Pnacl_Player Message of unhandled type " + (typeof message_event.data));
console.log("NaCl Player Message of unhandled type: " + (typeof message_event.data));
console.log(message_event.data);
}
}
Expand Down

0 comments on commit b6d7961

Please sign in to comment.