solara icon indicating copy to clipboard operation
solara copied to clipboard

Ipyreactplayer not working with solara

Open seidlr opened this issue 2 years ago • 3 comments

I've created an interactive videoplayer using ipyreact and react-player. It works in

  • jupyter notebook,
  • jupyter lab,
  • voila > 0.5
  • solara x

To reproduce

git clone https://github.com/seidlr/ipyreactplayer
cd ipyreactplayer
pip install -e .
pip install solara
solara run solara.ipynb

This results in the error:

Uncaught (in promise) TypeError: Cannot read properties of null (reading 'Player')
    at Vimeo.js:108:35

Interestingly voila < 0.5 gave the same error, but in voila >= 0.5 works.

seidlr avatar Oct 21 '23 17:10 seidlr

Hi,

I also cannot get it to work. I wonder if the approach that @kolibril13 suggests in https://github.com/widgetti/ipyreact/issues/45#issuecomment-1774776552 might fix it. It could be that esmodule support is not well functioning in reactplayer in combination with solara. If you get it working that way, lets us know! Still very strange that it does work in voila and normal jupyter.

Regards,

Maarten

maartenbreddels avatar Oct 30 '23 14:10 maartenbreddels

Thanks, I'll have a look. As mentioned the strange thing is that I got the same error as in solara with voila 0.4 but 0.5 somehow fixed it.

seidlr avatar Oct 30 '23 18:10 seidlr

Yeah, that probably gives us a hint. It could be something with requirejs being present in solara and voila < 0.5.

maartenbreddels avatar Oct 30 '23 19:10 maartenbreddels