小程序视频在ios端无法播放,时间都是00:00,点击没效果
微信小程序ios无法播放视频,安卓可以,视频格式为mp4?视频路径为https://yhp.pg024.com/Upload/video/3974E3A4021644F9234C2B04F911D3C9.mp4 <template> <view> <video class="videoPart" :src="src" controls loop :show-fullscreen-btn="false" :id="`video_${src}`" ref="`video_${src}`" @timeupdate="timeupdate"> </video> </view> </template> <script> export default{ props:{ src:{ type:String, default:'' }, play:{ type:Boolean, default:false }, initialTime:{ type:Number, default:0 }, }, data(){ return{ time:0, duration:0, playFirst:true } }, mounted() { this.videoCtx = uni.createVideoContext(`video_${this.src}`,this) }, methods:{ timeupdate(event){ this.duration = event.detail.duration if(!this.play) return if(this.time>=this.duration) this.time=0 this.time = event.detail.currentTime }, videoPlay(){ if(this.play){ this.videoCtx.play(); if(this.playFirst){ this.videoCtx.seek(this.startTime) this.playFirst = false } }else{ this.videoCtx.pause(); this.$emit('pause',this.time) } }, }, watch:{ play(newVal,oldVal){ this.videoPlay() }, startTime:{ immediate: true, handler(newVal,oldVal){ this.time = newVal } }, }, computed:{ startTime(){ return this.initialTime } } } </script> <style scoped> .videoPart{width: 100%;height: auto;max-height: 100%;position: static;} </style>
2020-09-12一样问题,真机请求都没有
微信小程序 websocket 真机调试 错误[图片][图片][图片] 在开发者工具里面都正常,在真机调试链接直接跳到错误回调,证书检测过没有中间证书和其它证书缺失。
2020-09-08