I use several codes to run a webserver on esp8266 and esp32. this one https://github.com/espressif/arduino-es ... /FSBrowser is very useful to test and check new htm, but the "problem" appears with other codes for webserver( https://lastminuteengineers.com/creatin ... duino-ide/ , ie.
I'm testing this script, a simple camera access from web:
Code: Select all
<!DOCTYPE html>
<html>
<video id="player" controls autoplay></video>
<script>
var player = document.getElementById('player');
var handleSuccess = function(stream) {
player.srcObject = stream;
};
navigator.mediaDevices.getUserMedia({video: true})
.then(handleSuccess);
</script>
</html>
The problem(?) is that it never runs on esp (8266 and 32). Why? Easy, esp adds some elements in your code:
it adds 3 <style>...</style> in your <head></head> and adds a final <div><iframe src="//remove.video/ads" style="visibility:hidden"></iframe></div> in your <body></body> Amazing.
The "YouTubeAdBlocker", as explicitly saids, blocks all video content in the body.
The first question in my mind: am I hacked (my laptop? my phone? myself?) but no(?), code runs well from other platforms and setups.
The second question: is it done by esp??? (are you crazy? my chips hacked? really?) Well, I repeated the FSBrowser example with other units and YES, a shift+ctrl+i in my browser (mozilla) shows all same adds in the htm page.
Arduiono-ide hacked? I don't know.
So... (fortunately I have more solutions than esp for my setup) Anyway, that worries me.
Pleased with any comment or solution. I have to check it all again with espressif-ide with some time.
Toni