All is prety simple:
2 case:
A) Using webview and just url:
String videoUrl = "https://www.youtube.com/embed/"+url;
Map<String, String> headers = new HashMap<>();
headers.put("Referer", "https://your_site_here.com/");
webView.loadUrl(videoUrl, headers);
B) Using webview and html file with iframe and so one:
Change from
webView.loadData(htmlContent, "text/html; charset=utf-8", null);
TO
webView.loadDataWithBaseURL("https://www.your_site_here.com/", htmlContent, "text/html", "charset=utf-8", null);
P.S: Instead of 'your_site' is possible to use something like this: "https://"+this.getPackageName()