【发布时间】:2021-07-16 14:40:29
【问题描述】:
我在使用 Laravel 作为后端并使用 Vue Js 作为前端在视图中显示视频时遇到问题。
这是我的代码。
我可以使用{{product.video[0].filename}} 显示数据库中的文件名,但无法在此行中翻译它 src="'video2/...
这是代码
{{product.video[0].filename}} //Here am able to display filename correctly from database
<video width="320" height="240" controls>
<source src="'video2/'+product.video[0].filename type="video/mp4">// This cant capture the
video from video folder.
</video>
但是如果我写 <source src="test.mp4" type="video/mp4"> 这可以正常工作,但我想使用数据库中的确切名称进行捕获。
【问题讨论】: