html52.com
我爱小程序-开发者交流社区

reLaunch是否与requestFullscreen冲突?

小程序嵌入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();

};

};

}

评论 抢沙发

  • 昵称 (必填)
  • 邮箱 (必填)
  • 网址

真正的个人免签约支付接口

云免签H5支付