react-youtube icon indicating copy to clipboard operation
react-youtube copied to clipboard

Problem with opts

Open RamboGj opened this issue 2 years ago • 2 comments

I'm getting a problem when first rendering my component, I didn't get the error on my opts Screenshot_1 Screenshot_2 .

RamboGj avatar Apr 01 '22 17:04 RamboGj

I have the same issue. However if I give them directly into the opts as an object it seems to work as a temporary workaround.

kkovax25 avatar Apr 07 '22 12:04 kkovax25

you can get past the error by typing the playervars options as constants like so:

      const opts = {  
        height: '390',   
        width: '640',  
        playerVars: {  
          // https://developers.google.com/youtube/player_parameters  
          autoplay: 1 as const,
          controls: 1 as const,
          disablekb: 1 as const,
          iv_load_policy: 3 as const,
          fs: 0 as const,
        },
      }

rekliner avatar Dec 20 '22 01:12 rekliner