cordova打包之后图片和视频不能显示
[图片]
[图片]
好的格式请见链接
cordova打包之后图片和视频不能显示
右边是浏览器上测试的,左边是cordova 打包的
代码
https://gitee.com/starplatinum111/vue3-zhihu-ts
src\views\MyVideo.vue
git remote add origin https://gitee.com/starplatinum111/zhihu-cordova.git
zhihu-cordova 项目
https://gitee.com/starplatinum111/zhihu-cordova
使用的是 <video
<video
class="video" :src="VideoItem.Video.videoPath"
:poster="VideoItem.Video.videoCover"
webkit-playsinline
playsinline
x5-video-player-type="h5"
preload="none"
@click="playHandler($event)"
@loadeddata="watchHandler"
ref="video"></video>
Video: {
// videoPath: require("@/assets/blackBro.flv"),
// videoPath: require("@/assets/youhou.mp4"),
videoPath: "http://starplatinumora.top/images/video/top10%E7%9C%81%E7%8E%B0%E6%9C%89%E7%A1%AE%E8%AF%8A%E7%97%85%E4%BE%8B%E5%AF%B9%E6%AF%94.mp4",
// videoPath:"@/assets/blackBro.flv",
// userAvatar:"../assets/miku.jpg"
// userAvatar:"@/assets/miku.jpg"
// userAvatar:"src/assets/miku.jpg"
userAvatar: require("@/assets/miku.jpg"),
userNickname: "java",
videoDesc: "videoDesc",
videoCover: "http://starplatinumora.top/images/1541000669139474.jpg",
videoId: "1",
},
数据是http来的,不是本地,难道是必须https?
[图片]