我的插件有问题。当您在控制面板中调整ipad safari的屏幕大小时,不会调整大小。在所有其他浏览器都可以。 当页面上有多个视频时,会出现此问题。如果视频是一切都好的话。控制面板调整大小
小组未调整大小:
初始玩家:
$(".one-item video").each(function (i, item) {
$(item).mediaelementplayer({
videoWidth: "100%",
videoHeight: height,
alwaysShowControls: true,
enableAutosize: false,
features: ['playpause', 'current', 'progress', 'duration', 'tracks', 'volume', 'fullscreen', 'loop'],
success: function (mediaElement, domObject) {
}
});
});
答案 0 :(得分:0)
我做出这样的决定。第2662行之前的播放器mediaelement-and-player.js添加方法无论如何,使用setTimeout。在ipad上工作
t.globalBind('orientationchange', function(){
setTimeout(function(){
// Look at the value of window.orientation:
// alert('ok')
if ( !(t.isFullScreen || (mejs.MediaFeatures.hasTrueNativeFullScreen && document.webkitIsFullScreen)) ) {
t.setPlayerSize(t.width, t.height);
}
// always adjust controls
t.setControlsSize();
},500);
});