Kalatxori
Kalatxori

Reputation: 55

Installing custom-made Kurento module in node.js

What I've done

I've developed a custom-made Kurento Media Server module but I'm having issues when I try to use it in my node.js application.

This is the system's description:

Based on the one to one tutorial, 2 clients establish connection with each other. My module, which is a OpenCV module, takes each frame and converts it to grayscale. Client A's WebRTCEndpoint is connected to my module and this is connected to the B clients WebRTCEndpoint. The purpose is to apply the grayscale filter to A's video stream, while B's one should maintain intact.

After programming everything, I've installed it in the Kurento Media Server just like the developer team explains it in the official documentation (it seems to be ok because when I execute kurento-media-server -v command I see it alongside other ones). The last step I've done is generating the Javascript library with cmake .. -DGENERATE_JS_CLIENT_PROJECT=TRUE.

The problem is that I don't know how to add it in my application. I have it locally, so I suppose I don't have to add the module dependency in my package.json file, right?

Upvotes: 1

Views: 451

Answers (1)

igracia
igracia

Reputation: 3541

If your server app is a node.js application, you'll need to import the module in your package.json. You can find an example of a node.js tutorial using an external module here and here. You can see their package.json, and they have the modules imported. Otherwise, your app won't have the correct types imported.


EDIT

You'll still need to register the module in your server.js code. From the same project used in the other links from this answer, you can see an example here.

Upvotes: 1

Related Questions