From 876b1d55fcb9de051c257567549dad6bfc981c5b Mon Sep 17 00:00:00 2001 From: Javier Viguera Date: Wed, 12 Nov 2025 17:29:44 +0100 Subject: [PATCH] connectcore-demo-example: use is_local_access for local run detection According to the API, navigator.platform is unreliable and not recommended for runtime detection. As our platforms are ARM based, we were using it to get the platform and grep for a literal arm. That fails for example when using chromium browser on the ConnectCore devices, as it is reporting 'Linux x86_64' even running on an arm64 device. Instead use the already implemented is_local_access function to detect whether the browser is running locally in the target. https://onedigi.atlassian.net/browse/DEL-9838 Signed-off-by: Javier Viguera --- connectcore-demo-example/static/js/common.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/connectcore-demo-example/static/js/common.js b/connectcore-demo-example/static/js/common.js index f8bb81f..4d2e588 100644 --- a/connectcore-demo-example/static/js/common.js +++ b/connectcore-demo-example/static/js/common.js @@ -531,7 +531,7 @@ function getDeviceName() { // Updates the available web sections. function updateAvailableSections() { // Remove device specific sections when rendering the demo from a computer. - if (!navigator.platform.includes("aarch") && !navigator.platform.includes("arm")) { + if (!is_local_access()) { removeSection(ID_SECTION_MULTIMEDIA); removeSection(ID_SECTION_NPU); }