Skip to content

Commit

Permalink
Show logs prominently in noinput mode
Browse files Browse the repository at this point in the history
When combining logtoscreen and noinput parameters, put the logs over
the video, to make sure they can be read on-screen.  This makes
debugging easier on smart TVs.

Issue #1610

Change-Id: I34fc8da6119b4fc3fe49bd0c6a5723d0d80bab36
  • Loading branch information
joeyparrish committed Nov 8, 2018
1 parent 46ce5bd commit 9c8573a
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 0 deletions.
11 changes: 11 additions & 0 deletions demo/demo.css
Original file line number Diff line number Diff line change
Expand Up @@ -212,6 +212,17 @@ summary {
padding: 0;
}

body.noinput #logSection #log {
/* noinput mode: if displayed, put the logs higher up on screen, over the top
of the video. */
position: fixed;
top: 0;
left: 0;
margin: 10px;
width: auto;
height: calc(100% - 30px);
}

#customAsset {
display: none;
}
Expand Down
1 change: 1 addition & 0 deletions demo/log_section.js
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,7 @@ shakaDemo.onLogChange_ = function() {
let logSection = document.getElementById('logSection');
if (logToScreen.checked) {
logSection.style.display = 'block';
logSection.open = true; // Open the details to show the logs.
for (let k in shakaDemo.patchedConsoleMethods_) {
console[k] = shakaDemo.patchedConsoleMethods_[k];
}
Expand Down

0 comments on commit 9c8573a

Please sign in to comment.