最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

javascript - React Player with vimeo video? - Stack Overflow

programmeradmin0浏览0评论

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 badges
Add a ment  | 

1 Answer 1

Reset to default 7

You should use prop controls to show player controls.

...
<ReactPlayer
        url="https://vimeo./352786895"
        controls
      />
...
发布评论

评论列表(0)

  1. 暂无评论