26.11.2021, 14:53
(19.01.2019, 20:08)Erwin van der Zwart Wrote: Hi,
Somehow Android is having issues with the touchstart parameter, removed it in the sample below:
BR,Code:$(function(){ // Fullscreen function function fullScreen() { if (!document.fullscreenElement && !document.mozFullScreenElement && !document.webkitFullscreenElement && !document.msFullscreenElement ) { if (document.documentElement.requestFullscreen) { document.documentElement.requestFullscreen(); } else if (document.documentElement.msRequestFullscreen) { document.documentElement.msRequestFullscreen(); } else if (document.documentElement.mozRequestFullScreen) { document.documentElement.mozRequestFullScreen(); } else if (document.documentElement.webkitRequestFullscreen) { document.documentElement.webkitRequestFullscreen(); } } } (function() { var StartUserInput = function (e) { fullScreen(); // Check if document is loaded in iframe if (window.frameElement){ // Remove event listeners from parent var thisparent = window.parent; thisparent.document.removeEventListener('touchend', StartUserInput); thisparent.document.removeEventListener('click', StartUserInput); } // Remove events document.removeEventListener('touchend', StartUserInput); document.removeEventListener('click', StartUserInput); }; // Check if document is loaded in iframe if (window.frameElement){ // Add event listeners to parent var thisparent = window.parent; // Event listener for iOS 9+ (is now touchend event) thisparent.document.addEventListener('touchend', StartUserInput); thisparent.document.addEventListener('click', StartUserInput); } // Event listener for iOS 9+ (is now touchend event) document.addEventListener('touchend', StartUserInput); document.addEventListener('click', StartUserInput); })(); });
Erwin
Is there any way to use it on Mosaic visu? I'm testing it on a Hikvision Android intercom monitor (Logicmachine app doesn't work on it, I don't know why), so I'm using the web browser, but there is no option to keep the app totally fullscreen.