From 9c8573a5f1b5b4416517c27f0ea0cebaa83c8ac3 Mon Sep 17 00:00:00 2001 From: Joey Parrish Date: Thu, 11 Oct 2018 10:21:59 -0700 Subject: [PATCH] Show logs prominently in noinput mode 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 --- demo/demo.css | 11 +++++++++++ demo/log_section.js | 1 + 2 files changed, 12 insertions(+) diff --git a/demo/demo.css b/demo/demo.css index 453a4a6c26..40c6c20eeb 100644 --- a/demo/demo.css +++ b/demo/demo.css @@ -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; } diff --git a/demo/log_section.js b/demo/log_section.js index f5700c486d..7e8d7cd229 100644 --- a/demo/log_section.js +++ b/demo/log_section.js @@ -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]; }