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

YT script does not load when run from a chrome extension

Open walidvb opened this issue 4 years ago • 1 comments

Current Behavior

I'm trying to render a ReactPlayer from a chrome extension, on a facebook page. Soundcloud players load fine, but not youtube's

Expected Behavior

The youtube iframe should be rendered, or an error should be raised.

Steps to Reproduce

  1. download the chrome repo (make sure you're on the preact branch)
  2. load it as an unpacked extension
  3. open a facebook page containing a post with a youtube link

Environment

  • URL attempting to play: any (but can try with this: https://www.youtube.com/watch?v=Rc2zdjQU7RA to reproduce)
  • Browser: Brave/Chrome Version 1.21.73 Chromium: 89.0.4389.72 (Official Build) (x86_64)
  • Operating system: MacOS 11.1

Other Information

From my debugging, it seems like this is never called. I'm unable to understand where exactly this fails. The extension modifies facebook headers to allow loading a script from https://youtube.com. It works fine with soundcloud

Running the code returned by youtube does add YT to the window, but it doesn't seem to indeed add it via load-script.

PS: embedding a regular youtube iframe works as expected(but you don't get the controls)

walidvb avatar Mar 22 '21 18:03 walidvb

I also have the same problem, please help if there is a solution. Message show : Videos un available View on youtube

deannguyen27 avatar Nov 12 '21 06:11 deannguyen27