视频播放时,点击全屏后,再点击退出全屏后,视频的位置会向右偏移,求回复
连进度条也跟着整体右移
机型:华为荣耀6
版本:6.5.22
wxml代码:
<view class=“video-wrapper”>
<video class=“play-video” poster="{{poster}}" src="{{src}}" custom-cache="{{false}}"></video>
</view>
js代码:
var app = getApp();
const mta = require(’…/…/…/utils/mta_analysis.js’);
Page({
onShareAppMessage: function (res) {
wx.showShareMenu({
withShareTicket: true
});
var _this = this;
return {
title: ‘尚德名师’,
path: ‘/pages/teacher/play/play?poster=’ + _this.data.poster + ‘&src=’ + _this.data.src + ‘&channelSite=’ + app.globalData.channelSite + ‘&shareUserId=’ + app.globalData.userId,
success: function (res) {
// 转发成功
let forwardType = 0;
if (res.shareTickets) {
forwardType = 1;
}
app.Util.logShareInfo(_this.route, _this.data.pageParams, app.globalData, forwardType);
},
fail: function (res) {
// 转发失败
}
}
},
onLoad: function (params) {
var _this = this;
app.pollCheck().then(() => {
mta.Page.init();
mta.Event.stat(‘visit_channel_site’, {
‘visitpath’: ‘teacher-play-’ + app.globalData.channelSite
});
app.Util.logPageInfo(_this.route, params, app.globalData, 0);
_this.setData({
pageParams: params
});
})
this.setData(params);
},
onHide() {
let _this = this;
app.Util.logPageInfo(_this.route, _this.data.pageParams, app.globalData, 1);
},
})
使用的是微信video组件自带的播放控件点击全屏和退出全屏的