How to Include Janus in a React App

91 views
Skip to first unread message

Divyansh Jain

unread,
Feb 11, 2023, 2:18:59 PM2/11/23
to meetecho-janus
Hi all,

I have a ReactJs app and I want to include a page similar to demos section in janus.
For that, I want to just test it by including these four files directly - { streamingtest.html, streamingtest.js, settings.js and janus.js } from the janus repo as I want to keep things simple in beginning.

But I don't know how to use these files in a React App?
I would highly appreciate if anyone can help me out! 

Best,
Divyansh

Jonathan Müller

unread,
Feb 14, 2023, 2:20:43 AM2/14/23
to meetecho-janus
You can pull in janus.js via NPM/package.json. A bit of trickery is required, see https://janus.conf.meetecho.com/docs/js-modules.html.
If you use create-react-app and don't want to eject, you can use this trick: https://marmelab.com/blog/2021/07/22/cra-webpack-no-eject.html (I have had this working successfully for JS, but not really TS).

Settings, state and they layout etc. you'll have to do yourself. There is not much use in including streamingtest.html etc.
Reply all
Reply to author
Forward
0 new messages