<template>
<view class="house-details">
<video
id="video"
class="house-video"
src="https://qiniu-web-assets.dcloud.net.cn/unidoc/zh/2minute-demo.mp4"
:autoplay="false"
></video>
</view>
</template>
<script>
export default {
data() {
return {
};
},
onReady: function (res) {
// #ifndef MP-ALIPAY
this.videoContext = uni.createVideoContext("video");
this.videoContext.stop();
// #endif
},
};
</script>

大玖
- 发布:2024-03-07 11:01
- 更新:2025-08-09 16:00
- 阅读:711

Fonkelid - uniapp
这个问题 ,我也遇到了,很无语 如果加 autoplay = "true" 就没问题,清除所有缓存后,重新打开,就没会再报错。
但是 视频会自动播放,一旦不加,或者 autoplay="false" 就妥妥的报错,不知道各位是怎么解决的?
大玖 (作者)
代码已经放上来了
2024-03-07 22:09
套马杆的套子
回复 大玖: 你是什么问题啊?我刚用的你的代码试了,没发现什么问题,也没报错。
2024-03-08 08:18