diff --git a/works/Danja Vasiliev/otastaImg/data/index.html b/works/Danja Vasiliev/otastaImg/data/index.html index 2a9b2c5..3c0dcbb 100644 --- a/works/Danja Vasiliev/otastaImg/data/index.html +++ b/works/Danja Vasiliev/otastaImg/data/index.html @@ -189,7 +189,7 @@

Your browser could not connect to phone's sensors.

-

You can try using Firefox browser or continue in finger-action mode!

+

Please use Android + Firefox browser!

@@ -324,7 +324,7 @@ var th_handles = function(e) { }; -if(window.DeviceOrientationEvent) { +if(window.DeviceOrientationEvent && iOS()==false) { window.addEventListener('deviceorientation', do_handles); @@ -339,7 +339,19 @@ if(window.DeviceOrientationEvent) { } - +//detect ios +function iOS() { + return [ + 'iPad Simulator', + 'iPhone Simulator', + 'iPod Simulator', + 'iPad', + 'iPhone', + 'iPod' + ].includes(navigator.platform) + // iPad on iOS 13 detection + || (navigator.userAgent.includes("Mac") && "ontouchend" in document) +} diff --git a/works/Danja Vasiliev/otastaImg/otastaImg.ino b/works/Danja Vasiliev/otastaImg/otastaImg.ino index 2d95fae..001c3b9 100644 --- a/works/Danja Vasiliev/otastaImg/otastaImg.ino +++ b/works/Danja Vasiliev/otastaImg/otastaImg.ino @@ -19,7 +19,7 @@ //#define STASPSK "mypassword" #endif - IPAddress apIP(192, 168, 4, 1); + IPAddress apIP(8, 8, 8, 8); const char* ssid = STASSID; //const char* password = STAPSK; @@ -46,7 +46,7 @@ //redirect all traffic to index.html server.onNotFound([]() { if(!handleFileRead(server.uri())){ - const char *metaRefreshStr = "

redirecting...

"; + const char *metaRefreshStr = "

redirecting...

"; server.send(200, "text/html", metaRefreshStr); } });