问题一: 我的界面由于是自定义导航栏,所以使用video时,上滑界面video会直在最上层,盖着 头部导航栏
解决方法:使用cover-view,自定义头部使用cover-view替换view
问题二:自定义导航栏上面有menu,点击会出现一个弹出层,但是弹出层会被video压到
解决方法:使用原生窗体subNVues(uni-app subNVue 原生子窗体开发指南 - DCloud问答),原生窗体在第一次打包的时候可能会显示问题,打包的时候注意一下就行。详细的以上链接有说明
使用uni.createVideoContext,具体方法:
playing(e) {// 获取当前视频idlet currentId = e.currentTarget.dataset.idconsole.log(currentId);// uni.createVideoContext获取视频上下文对象this.videoContent = uni.createVideoContext(currentId)// 获取json对象并遍历, 停止非当前视频//operationList为video循环列表let operationList = this.operationListfor (let i = 0; i < operationList.length; i++) {let temp = operationList[i].idif (temp !== currentId) {uni.createVideoContext(temp).pause()}}},
以上就可以解决安卓手机上,多视频播放的问题啦
下一篇:Kafka 位移提交