Search the Community
Showing results for tags 'fullscreen'.
-
I am trying to force GoogleMaps to FullScreen via code (MainFormDisplayMode:= mfPage;). Please advise how - Thanks in advance Played with <div s:= '<div id="uni_map_canvas" style="position: absolute; width: 100%; height: 100%"> '+ ' <iframe '+ ' src="https://www.google.com/maps/embed/v1/place?key=xxx" '+ ' width="100%" '+ ' height="100%" '+ ' style="border:0;" '+ ' allowfullscreen '+ ' referrerpolicy="no-referrer-when-downgrade" '+ ' loading="lazy" '+ ' > '+ ' </iframe> '+ '</div>'; UniHTMLFrame1.HTML.Add(s); Played with CSS s:= '.google-maps ' + '{ '+ ' position: relative; '+ ' padding-bottom: 75%; '+ ' height: 0; '+ ' overflow: hidden; '+ '} '+ '.google-maps iframe '+ '{ '+ ' position: absolute; '+ ' top: 0; '+ ' left: 0; '+ ' width: 100% !important; '+ ' height: 100% !important; '+ '} '; CustomCSS.Add(s); s:= '.box '+ '{ '+ ' height: 100%; '+ '} '+ '.box iframe '+ '{ '+ ' width: 100%; '+ ' height: 100%; '+ ' border: none; '+ '} '+ 'html, body '+ '{ '+ ' margin: 0; '+ ' padding: 0; '+ ' width: 100%; '+ '} '+ 'body '+ '{ '+ ' font-family: "Helvetica Neue", sans-serif; '+ ' font-weight: lighter; '+ ' height: 100%; '+ '} '; CustomCSS.Add(s);
-
Is there a demo or can someone explain whether there's a UniGUI based way to request fullscreen mode from the browser (on login say)? E.g using browser API as mentioned here: https://davidwalsh.name/fullscreen https://developer.mozilla.org/en-US/docs/Web/API/Fullscreen_API There seems to be some differences between how browsers handle this (sigh) which seems to be taken care of by the following library, apparently: https://github.com/sindresorhus/screenfull.js/