iOS video 播放横屏布局问题
系统:iOS 10.3.3 微信:WeChat 6.5.14 在小程序中播放横屏视频: [代码]<[代码][代码]video[代码] [代码]id[代码][代码]=[代码][代码]"video_8048"[代码] [代码]data-id[代码][代码]=[代码][代码]"video_8048"[代码] [代码]src[代码][代码]=[代码][代码]"https://pcmgrminiclubvideo-1252940971.file.myqcloud.com/group/src/10199/7838435773816479296.mp4"[代码] [代码]controls [代码][代码]bindfullscreenchange[代码][代码]=[代码][代码]"fullScreenChange"[代码] [代码]bindended[代码][代码]=[代码][代码]"playEndEvt"[代码] [代码]objectFit[代码][代码]=[代码][代码]"cover"[代码][代码]>[代码]video[代码][代码]>[代码][代码] [代码]var[代码] [代码]videoContext = wx.createVideoContext([代码][代码]'video_8048'[代码][代码]);[代码][代码]videoContext.requestFullScreen();[代码][代码]videoContext.play();[代码][代码]fullScreenChange: [代码][代码]function[代码] [代码](event) {[代码][代码] [代码][代码]if[代码] [代码](!event.detail.fullScreen) { [代码][代码]// 退出全屏[代码][代码] [代码][代码]var[代码] [代码]id = event.target.id;[代码][代码] [代码][代码]var[代码] [代码]videoContext = wx.createVideoContext(id);[代码][代码] [代码][代码]videoContext.pause();[代码][代码] [代码][代码]videoContext.exitFullScreen();[代码][代码] [代码][代码]}[代码][代码]},[代码][代码]playEndEvt: [代码][代码]function[代码] [代码](event) {[代码][代码] [代码][代码]var[代码] [代码]id = event.target.id;[代码][代码] [代码][代码]var[代码] [代码]videoContext = wx.createVideoContext(id);[代码][代码] [代码][代码]videoContext.pause();[代码][代码] [代码][代码]videoContext.exitFullScreen();[代码][代码]},[代码] 调用 videoContext.pause(); videoContext.exitFullScreen(); 播放后,待播放完毕后退出全屏,偶现小程序,微信都变成横屏布局模式,如下图: [图片]