Html [src]=";布道?.布道视频“;不工作。不过,它也适用于图片
所以…我试图从data.json获取页面上的视频Html [src]=";布道?.布道视频“;不工作。不过,它也适用于图片,html,json,angular,ionic-framework,ionic5,Html,Json,Angular,Ionic Framework,Ionic5,所以…我试图从data.json获取页面上的视频 "name": "Finding Grace", "profilePic": "/assets/img/stuffs/PastorEvaFace.jpg", "sermonVideo": "/assets/videos/Sermon1.mp4", "about": "Learn to fnid Grace in every circumstance and realize just how much God has giv
"name": "Finding Grace",
"profilePic": "/assets/img/stuffs/PastorEvaFace.jpg",
"sermonVideo": "/assets/videos/Sermon1.mp4",
"about": "Learn to fnid Grace in every circumstance and realize just how much God has given you.",
"sum": "God has given us grace, we just need to open our eyes.",
"location": "Everywhere",
"id": "1"
奇怪的是,如果我直接将视频来源,效果很好
这是我的代码,然后我会解释更多
html
有人知道为什么它不能播放视频吗?我跑得很好
我在尝试视频时遇到错误“未找到支持格式和mime类型的视频”
提前感谢您获取峰值我认为问题在于返回的路径值 data.json中的路径以“/”开头(绝对路径)
“sermonVideo”:“/assets/videos/Sermon1.mp4”
而您用于测试的那个并没有
“src=assets/videos/Sermon1.mp4”
您是否可以使用codepen.io代码片段或S.O.可运行脚本让其他人看到您的代码片段产生的错误。非常感谢你的帮助!我试着把它弄得乱七八糟,但还是不行。我更改了文件路径,但没有成功。谢谢你的建议。
"name": "Finding Grace",
"profilePic": "/assets/img/stuffs/PastorEvaFace.jpg",
"sermonVideo": "/assets/videos/Sermon1.mp4",
"about": "Learn to fnid Grace in every circumstance and realize just how much God has given you.",
"sum": "God has given us grace, we just need to open our eyes.",
"location": "Everywhere",
"id": "1"