小程序嵌入webview,通过 wx.miniProgram.reLaunch({}) 可以返回到小程序,但是调用了requestFullscreen()和exitFullscreen()之后wx.miniProgram.reLaunch 无效
wx.miniProgram.reLaunch({
url: "pages/videoList/videoList",
});
fullScreen: function(e) {
var self = controler;
self.stopDefault(e);
var videoBox = document.getElementById('video-box');
if (!self.fullScreenFlag) {
self.fullScreenFlag = true;
if (videoBox.requestFullscreen) {
videoBox.requestFullscreen();
} else if (videoBox.mozRequestFullScreen) {
videoBox.mozRequestFullScreen();
} else if (videoBox.webkitRequestFullScreen) {
videoBox.webkitRequestFullScreen();
} else if (videoBox.msRequestFullscreen) {
videoBox.msRequestFullscreen();
} else if (videoBox.oRequestFullscreen) {
videoBox.oRequestFullscreen();
};
} else {
self.fullScreenFlag = false;
if (document.exitFullscreen) {
document.exitFullscreen();
} else if (document.mozCancelFullScreen) {
document.mozCancelFullScreen();
} else if (document.webkitCancelFullScreen) {
document.webkitCancelFullScreen();
} else if (document.msExitFullscreen) {
document.msExitFullscreen();
} else if (document.oCancelFullScreen) {
document.oCancelFullScreen();
};
};
}