有人知道为什么我的视频无法加载吗?它显示了播放器,但没有视频。
class App extends Component {
render() {
return (
<div className="App">
<p>hello</p>
<video width="750" height="500" controls >
<source src="..Videos/video1.mp4" type="video/mp4"/>
</video>
</div>
);
}
}
这是我的目录结构:
我尝试了建议中的方法:src="../Videos/video1.mp4"
,但结果相同。
require
而不是import
,一切都运行得非常顺利! - gignu