From 65a4c7b9193ab577eb93ff5d0fd87a6048592696 Mon Sep 17 00:00:00 2001 From: YU-CHI HSIEH Date: Fri, 7 Jan 2022 17:46:28 +0800 Subject: [PATCH] Modified player -Debug Logger- to fix console error Change-Id: I27f6dde509f5b5d5c3b9a87f763daa240103f157 --- js/player.js | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/js/player.js b/js/player.js index 884158b..e789895 100644 --- a/js/player.js +++ b/js/player.js @@ -46,12 +46,18 @@ analytics_.start(); * Debug Logger Object * setEnabled: Enable debug logger and show a 'DEBUG MODE' overlay at top left corner. * showDebugLogs: Displays the logs through an overlay on the receiver. - * Uncomment setEnabled() and showDebugLogs() to enable this functionality. * Make sure to change setEnabled to false when deploying to production. */ const castDebugLogger = cast.debug.CastDebugLogger.getInstance(); -// castDebugLogger.setEnabled(true); -// castDebugLogger.showDebugLogs(true); + /** + * Uncommnet the following code to enable its functionality + */ +// context.addEventListener(cast.framework.system.EventType.READY, () => { +// if (!castDebugLogger.debugOverlayElement_) { +// castDebugLogger.setEnabled(true); +// castDebugLogger.showDebugLogs(true); +// } +// }); // enables logging for described events at the configured logging level castDebugLogger.loggerLevelByEvents = {