Событие веб-просмотра видео «onShowCustomView» запускается на весь экран, но когда я возвращаюсь к маленькому экрану, никакой список не работает.
также, когда я включаю в полноэкранном режиме.Обе функции
onShowCustomView и onHideCustomView работают вместе.когда я пытаюсь вернуться на маленький экран.ни одна из функций не вызывается.
function onWebViewLoaded1(webargs, url) {
var page = webargs.object.page;
var webview = webargs.object;
var customViewContainer = view.getViewById(webview, 'singleimgpopup');
var viewr = view;
var __extends = (this && this.__extends) || (function () {
var extendStatics = function (d, b) {
extendStatics = Object.setPrototypeOf ||
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
return extendStatics(d, b);
};
return function (d, b) {
extendStatics(d, b);
function __() { this.constructor = d; }
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
};
})();
var MyWebChromeClient = /** @class */ (function (_super) {
__extends(MyWebChromeClient, _super);
function MyWebChromeClient() {
var _this = _super.call(this) || this;
return global.__native(_this);
}
MyWebChromeClient.prototype.onStop = function(){
console.log("this");
}
MyWebChromeClient.prototype.onShowCustomView = function (view, callback) {
// Store the view and its callback for later (to kill it properly)
if(this.mCustomView != null){
callback.onCustomViewHidden(); return
}
this.mCustomView = view;
// webview.setVisibility(View.GONE);
this.mCustomViewCallback = callback;
console.log('fullscreen');
};
MyWebChromeClient.prototype.onHideCustomView = function () {
console.log("this2");
_super.prototype.onHideCustomView.call(this);
_super.prototype.mCustomView = null;
};
return MyWebChromeClient;
}(android.webkit.WebChromeClient));
webview.android.getSettings().setJavaScriptEnabled(true);
webview.android.getSettings().setAppCacheEnabled(true);
webview.android.getSettings().setBuiltInZoomControls(true);
webview.android.getSettings().setSaveFormData(true);
let myWebChromeClient = new MyWebChromeClient();
webview.android.setWebChromeClient(myWebChromeClient);
// console.log("1=====================url",url);
// webview.android.loadUrl(url);
}
выше работает, но я могу console.log ("поставить полный экран").Но я не могу поймать экземпляр / событие / список на «EXIT FULLSCREEN», когда я нажимаю на значок, приведенный ниже. Как я могу узнать, нажал ли кто-нибудь на значок, указанный ниже.
![enter image description here](https://i.stack.imgur.com/TLsUc.png)