From 8fa33ed7aa696b337569617ff2740c6b16a63360 Mon Sep 17 00:00:00 2001 From: Tamius Han Date: Sun, 9 Dec 2018 02:13:26 +0100 Subject: [PATCH] fixed video registering --- js/lib/Comms.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/js/lib/Comms.js b/js/lib/Comms.js index cfea43a..525fb5f 100644 --- a/js/lib/Comms.js +++ b/js/lib/Comms.js @@ -144,7 +144,9 @@ class CommsClient { if (Debug.debug && Debug.comms) { console.log(`[CommsClient::registerVideo] <${this.commsId}>`, "Registering video for current page."); } - this.port.postMessage({cmd: "has-video"}); + if (this.pageInfo.videos.length) { + this.port.postMessage({cmd: "has-video"}); + } } unregisterVideo(){