eyeson-team / react-web-gui-example

eyeson Web Client Example: Build a Custom Interface for eyeson Video Meeting
https://eyeson-team.github.io/react-web-gui-example/
MIT License
10 stars 11 forks source link

Eyeson JS API with Codeigniter View page/HTML page #10

Closed pinakim79 closed 4 years ago

pinakim79 commented 4 years ago

Hello,

We are trying to integrate the Eyeson JS API in one of our existing Codeigniter project. We are trying to customize the UI.

We have downloaded the JS Package using NPM and compiled it along with browserify to link it our View page under HTML script tag.

However, we are constantly getting the error in console log as "Uncaught ReferenceError: eyeson is not defined". We have checked with the API Documentation but we could not find much details provided regarding the same.

We have also tried to use the JS file available in the dist folder of the eyeson module under the downloaded NPM package, as shown in the example index.html, but then another error is logged in console as "Uncaught TypeError: eyeson.onEvent is not a function".

We therefore request to to inform us the proper way to link the Eyeson JS API in HTML page/Codeigniter View page.

unused commented 4 years ago

Hi, for questions on how to include JavaScript packages in Codeigniter I'd ask you to read the proper documentations of the framework or ask in the community channels. With a modern JavaScript packaging setup all you have to do is to import the package import eyeson from 'eyeson' after installation. If you need to include the source in a static environment load <script src="node_modules/eyeson/dist/eyeson.js"></script> and check for window.eyeson afterwards. Best wishes!