- 安卓系统input组件,初次触发获取焦点事件相关问题?
input输入框组件 安卓手机系统 ,微信版本 8.0.35 调试基础库2.31.0 现象是:在安卓系统中,input输入框首次点击触发焦点事件,去动态获取键盘高度时,获取的键盘高度不对,导致设置bottom 没有效果,input输入框失去焦点之后;再次点击input输入框,触发焦点事件,此时,动态获取的键盘高度是正确的,不知道是什么
2023-05-11 - 微信原生的直播拉流组件中requestFullScreen()这个方法不生效?
组件名:<live-player></live-player> 基础库版本号:2.26.2 微信版本:8.0.34 //页面 <view bindtap="showFull"> <view class="live-video" bindtap="showFull"> <live-player id="livePlayer" src="{{liveUrl}}" mode="live" autoplay bindstatechange="statechange" binderror="error"> <view class='full_img_idv' catchtap="hideFull" wx:if="{{showControls}}"> <view class="col-box" bindtap="unFullScreen" wx:if="{{fullScreenFlag}}"> 退出全屏 </view> <view class="col-box" wx:else bindtap="onFullScreen"> 全屏 </view> </view> </live-player> </view> </view> //js Page({ data: { liveUrl:"", fullScreenFlag: false, showControls: false, LivePlayerContext: '' }, onLoad() { }, showFull() { this.setData({ showControls: true }) }, hideFull() { this.setData({ showControls: false }) }, onFullScreen() { console.log("点击全屏喽"); let that = this this.data.LivePlayerContext = wx.createLivePlayerContext('livePlayer') debugger this.data.LivePlayerContext.requestFullScreen({ direction: 90, success(e) { debugger that.setData({ fullScreenFlag: true }) }, fail(e) { debugger console.log(e) }, complete(e) { debugger console.log(e) } }) }, unFullScreen() { let that = this this.data.LivePlayerContext.exitFullScreen({ success(e) { that.setData({ fullScreenFlag: false }) }, }) }, statechange(e) { console.log('live-player code:', e.detail.code) }, error(e) { console.error('live-player error:', e.detail.errMsg) } })
2023-04-13