admin管理员组文章数量:1335895
I'm trying to add a vimeo video to my react project. I looked up a simple react player example but only was able to see the thumbnail of the video, it wont actually play. I've tried looking into different methods but I'm pretty lost. If someone could let me know what I'm missing or help point me in the right direction I would appreciate it.
Thanks!
Code:
import React from "react";
import ReactPlayer from "react-player"
function Home () {
return(
<>
<h1>Projects</h1>
<div>
<ReactPlayer
url=";
/>
</div>
</>
)
};
export default Home;
Result:
I'm trying to add a vimeo video to my react project. I looked up a simple react player example but only was able to see the thumbnail of the video, it wont actually play. I've tried looking into different methods but I'm pretty lost. If someone could let me know what I'm missing or help point me in the right direction I would appreciate it.
Thanks!
Code:
import React from "react";
import ReactPlayer from "react-player"
function Home () {
return(
<>
<h1>Projects</h1>
<div>
<ReactPlayer
url="https://vimeo./352786895"
/>
</div>
</>
)
};
export default Home;
Result:
Share Improve this question asked Oct 1, 2022 at 0:38 Peter McClellandPeter McClelland 532 silver badges10 bronze badges1 Answer
Reset to default 7You should use prop controls to show player controls.
...
<ReactPlayer
url="https://vimeo./352786895"
controls
/>
...
本文标签: javascriptReact Player with vimeo videoStack Overflow
版权声明:本文标题:javascript - React Player with vimeo video? - Stack Overflow 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1742394937a2466732.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论