From c0382f19b8d3ab93c94eff78e9cf364a87ed7f27 Mon Sep 17 00:00:00 2001 From: David Escalona Date: Wed, 6 Jul 2022 16:36:57 +0200 Subject: [PATCH] connectcore-demo-example: remove multimedia section when viewing from computer Remove the multimedia section when the demo is being rendered in a computer using the LAN connection. In this scenario, the computer browser will be the one doing all the 3D and video rendering and not the device, so this section has no sense in this case. Signed-off-by: David Escalona --- connectcore-demo-example/static/js/common.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/connectcore-demo-example/static/js/common.js b/connectcore-demo-example/static/js/common.js index 9f66d26..1a74a05 100644 --- a/connectcore-demo-example/static/js/common.js +++ b/connectcore-demo-example/static/js/common.js @@ -492,7 +492,10 @@ function getDeviceName() { // Updates the available web sections. function updateAvailableSections() { - // Send request to retrieve device type. + // Remove multimedia section when rendering the demo from a computer. + if (!navigator.platform.includes("aarch")) + removeSection(ID_SECTION_MULTIMEDIA); + // Set visible sections based on device type. $.post( "http://" + getServerAddress() + "/ajax/get_device_type", function(data) {